본문으로 건너뛰기

개발자

REST API 문서

Attorly 법률 AI를 위한 HTTPS 기반 JSON API입니다. MCP 서버와 같은 작업을 같은 키, 스코프, 한도, 과금으로 실행합니다.

빠른 시작

네 단계로 계약서를 업로드하고 분석하세요.

  1. 1. 키 만들기

    설정 › 개발자에서 키를 만들고 REST API를 고르세요. 같은 키로 MCP 서버도 사용합니다. 키를 환경 변수에 보관하세요:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. 문서 업로드

    파일을 multipart/form-data로 보내세요. 응답의 data.id가 문서 ID입니다. 다음 단계에서 분석을 실행하므로 analyze=false로 백그라운드 분석 없이 저장합니다.

    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. 분석

    Prefer: wait=30은 결과를 최대 30초 기다립니다. 분석이 끝나면 200과 함께 data에 결과가 담겨 돌아옵니다. 더 오래 걸리면 작업을 가리키는 Location 헤더와 함께 202 Accepted를 받습니다.

    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. 결과 가져오기

    상태가 succeeded 또는 failed가 될 때까지 작업을 조회하세요. 분석 결과는 result에 있습니다. 조회 간격은 Retry-After의 초를 따르세요.

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

인증

자격 증명을 Authorization 헤더에 Bearer 토큰으로 보내세요. 설정 › 개발자의 키는 lbmcp_로 시작하며 Pro와 Enterprise에서 REST API와 MCP 서버 모두에 사용할 수 있습니다. Enterprise 조직 키는 atly_로 시작합니다(제한 키는 atly_rk_, 테스트 모드는 atly_test_). 기존 lb_ 키도 계속 작동합니다. 사람을 대신해 동작하는 앱은 OAuth를 사용합니다.

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

스코프

각 엔드포인트에는 옆에 표시된 스코프가 필요합니다. 스코프가 없는 키는 403 insufficient_scope를 받으며, 오류의 requiredScopes에 호출에 필요한 모든 스코프가 나열됩니다. 조직 API 키와 OAuth는 다음 이름을 사용합니다:

스코프조직 API 키 스코프
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

오류

모든 오류는 같은 형태입니다. 분기에 쓰는 고정 코드, 사람이 읽는 메시지, 지원팀에 전달할 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"
  }
}

각 코드의 의미와 해결 방법은 다음에서 확인하세요: 오류 코드 페이지

버전

API는 날짜로 버전이 관리됩니다. Attorly-Version을 보내 요청별로 버전을 선택할 수 있으며, 보내지 않으면 키를 만들 때의 버전이 사용됩니다(버전 관리 이전의 키는 2026-10-01). 모든 응답에 응답한 버전이 표시됩니다. 호환되지 않는 변경은 새 버전에서만 도입되며 변경 기록에 나열됩니다.

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

멱등성

POST, PATCH, DELETE 요청에는 UUID 같은 Idempotency-Key 헤더를 보내세요. 같은 키와 같은 요청으로 재시도하면 첫 번째 응답이 Idempotent-Replayed: true와 함께 반환되고, 작업이 다시 실행되거나 다시 청구되지 않습니다. 다른 요청에 재사용한 키는 422 idempotency_key_reused를, 아직 실행 중인 키는 409를(오래 걸리는 호출이면 같은 작업을) 받습니다. 서버 오류는 저장되지 않으므로 재시도하면 다시 실행됩니다. 키는 24시간 동안 보관됩니다.

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

오래 걸리는 요청

버전 2026-11-01부터 전체 분석, 레드라인, 협상 플레이북, 워크플로, 실사 보고서, AI 초안은 즉시 202 Accepted와 작업을 반환합니다. Prefer: wait=30을 보내면 결과를 최대 30초(상한 60초) 먼저 기다리고, Prefer: respond-async를 보내면 모든 쓰기 요청에서 202를 받습니다. 상태가 succeeded 또는 failed가 될 때까지 Location을 조회하거나 operation.succeeded를 구독하세요. 결과는 24시간 동안 보관됩니다. 조직당 동시에 실행할 수 있는 장시간 AI 작업은 최대 5개이며, 초과하면 429 concurrency_limit_exceeded를 받습니다.

http
HTTP/1.1 202 Accepted
Location: /api/v1/operations/op_abc123
Retry-After: 2

{ "data": { "id": "op_abc123", "object": "operation", "status": "running", "resultUrl": "/api/v1/operations/op_abc123", … } }

페이지네이션

목록은 { object: "list", data, hasMore, nextCursor }를 반환하며 limit(1~100, 기본값 20)와 cursor를 받습니다. 다음 페이지를 가져오려면 nextCursor를 cursor로 보내세요. 마지막 페이지에서 nextCursor는 null입니다. 새 항목이 추가되어도 커서는 유효합니다.

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…

요청 한도

요청은 여러 창에서 집계됩니다: 키의 시간당 한도, 사람당 분당 300, 조직당 분당 600, 읽기·쓰기·AI 호출에 대한 키별 분당 한도, 그리고 각 작업 고유의 한도입니다. REST와 MCP는 같은 카운터를 공유합니다. RateLimit-Policy와 RateLimit 헤더는 모든 창을, X-RateLimit-*는 한도에 가장 가까운 창을 보여 줍니다. 한도를 넘으면 Retry-After와 함께 429를 받습니다.

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

웹훅

POST /api/v1/webhook-endpoints로 엔드포인트를 만들면 폴링하지 않고도 작업 완료 알림을 받을 수 있습니다. Attorly는 JSON 이벤트를 POST로 보내며, 엔드포인트의 whsec_ 시크릿으로 Standard Webhooks에 따라 서명합니다. 내용을 신뢰하기 전에 서명을 확인하고, 15초 안에 2xx로 응답하며, webhook-id로 중복을 제거하세요. 실패한 전송은 72시간 동안 재시도됩니다. 시크릿 교체, 테스트 이벤트 전송, 모든 전송 내역 확인이 가능합니다.

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

테스트 모드

테스트 키(atly_test_…)는 모든 엔드포인트에 접근하지만 분리된 테스트 데이터로 작동하고 고정된 예시 결과를 반환합니다. AI가 실행되지 않고 크레딧도 사용되지 않습니다. 테스트 키는 실제 데이터를 절대 볼 수 없습니다. 아무 텍스트 필드에 __fail_credits__, __fail_consent__, __slow__ 같은 매직 값을 넣으면 해당 오류나 지연을 재현할 수 있습니다. DELETE /api/v1/test-data는 테스트 키로 만든 모든 것을 삭제합니다.

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 사용자를 대신해 동작하는 앱은 OAuth 2.1로 로그인합니다: /.well-known/oauth-authorization-server에서의 검색, 동적 클라이언트 등록, PKCE(S256)를 사용하는 인가 코드 흐름입니다. REST API용 토큰을 받으려면 resource=https://attorly.ai/api/v1을 요청하세요. MCP 서버용으로 발급된 토큰은 여기서 거부됩니다. 리프레시 토큰을 받으려면 offline_access를 추가하세요. 사용자는 동의 화면에서 조직을 선택하고 스코프를 줄일 수 있습니다.

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

과금

AI를 사용하는 작업은 REST와 MCP 중 어느 쪽으로 호출하든 Attorly 앱과 같은 AI 크레딧을 키 소유자 또는 그 조직의 지갑에서 사용합니다. 크레딧이 소진되면 402 insufficient_credits를 받습니다. 테스트 모드 호출은 무료입니다.

요금제

API는 Pro 및 Enterprise에 포함되어 있습니다. 키 소유자의 요금제에 더 이상 API 접근이 포함되지 않거나 소유자가 조직을 떠난 경우, 요청은 403으로 거부됩니다.

레퍼런스

API가 직접 제공하는 OpenAPI 문서에서 생성한 모든 작업. 경로는 https://attorly.ai 기준 상대 경로입니다. 성공 응답은 결과를 data로 감쌉니다. 필드 설명은 영어입니다.

문서

GET/api/v1/documentslistDocuments

키로 읽을 수 있는 저장된 문서를 최신순으로 나열합니다.

스코프:DOCUMENTS_READ
쿼리 매개변수
필드형식설명
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

문서를 multipart/form-data로, 또는 base64 콘텐츠나 일반 텍스트가 담긴 JSON으로 업로드합니다. analyze가 false가 아니면 백그라운드에서 분석됩니다.

스코프:DOCUMENTS_WRITEAI 크레딧 사용파일 업로드 지원
요청 본문
필드형식설명
filename필수stringThe file name with its extension, e.g. "nda.pdf"; the extension decides the file type when mimeType is absent
contentBase64stringThe file, base64-encoded
textstringPlain text to store as a .txt document, instead of contentBase64
mimeTypestringThe file's MIME type; checked against its content
namestringDisplay name; defaults to the file name
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …What the document is
urlstring (uri)An https URL Attorly downloads the file from (public hosts only, up to 10 MB), instead of contentBase64 or text
analyzebooleanAnalyse the document in the background after upload, as the app does (uses AI credits). false stores it only
응답 데이터(201)
필드형식설명
id필수string
name필수string
originalName필수string
type필수"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
size필수integer
status필수"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueued필수booleantrue when the background analysis was started
createdAt필수stringISO 8601 date-time
url필수stringWhere the document opens in Attorly
curl
curl -X POST "https://attorly.ai/api/v1/documents" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "filename": "nda.txt",
  "text": "This Mutual Non-Disclosure Agreement is entered into by…",
  "type": "NDA"
}'
GET/api/v1/documents/searchsearchDocuments

키로 읽을 수 있는 문서의 본문을 의미와 정확한 단어로 검색합니다.

스코프:DOCUMENTS_READ
쿼리 매개변수
필드형식설명
query필수stringWhat to look for, in plain language or exact words
type"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …Only documents of this kind
limitinteger
cursorstringPass the nextCursor of the previous page to get the next one
curl
curl "https://attorly.ai/api/v1/documents/search?query=limitation+of+liability&limit=10" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/documents/{documentId}getDocument

문서와 처리 상태, 최신 분석을 가져옵니다.

스코프:DOCUMENTS_READ
경로 매개변수
필드형식설명
documentId필수string
응답 데이터(200)
필드형식설명
id필수string
name필수string
originalName필수string
type필수"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeType필수string
size필수integer
status필수"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archived필수boolean
ownedByYou필수boolean
versionNumber필수integer | nullThe document's number among its versions you can read ("version 2" — a new version is saved as a new document, never in place); null when it has no other version. documents_list returns the newest version of each document only.
createdAt필수stringISO 8601 date-time
updatedAt필수stringISO 8601 date-time
fileAvailable필수booleanfalse when the stored file can no longer be read
governingLawRequired필수booleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysis필수object | null
url필수stringWhere the document opens in Attorly
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
DELETE/api/v1/documents/{documentId}deleteDocument

소유한 문서의 삭제를 요청합니다. 문서는 Attorly에서 삭제를 승인한 경우에만 삭제됩니다.

스코프:DOCUMENTS_DELETE
경로 매개변수
필드형식설명
documentId필수string
응답 데이터(200)
필드형식설명
id필수string
deleted필수booleantrue only when the document is gone
status필수"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

문서 또는 인라인 텍스트를 분석합니다. mode는 full(저장된 문서) 또는 quick입니다.

스코프:DOCUMENTS_ANALYZEDOCUMENTS_READAI 크레딧 사용

본문의 mode 필드로 다음 중 하나를 고릅니다: mode: full, mode: quick.

요청 본문
필드형식설명
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

문서에 저장된 분석을 최신순으로 나열합니다.

스코프:DOCUMENTS_READ
경로 매개변수
필드형식설명
documentId필수string
쿼리 매개변수
필드형식설명
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

저장된 문서를 분석합니다.

스코프:DOCUMENTS_ANALYZEDOCUMENTS_READAI 크레딧 사용
경로 매개변수
필드형식설명
documentId필수string

본문의 mode 필드로 다음 중 하나를 고릅니다: mode: full, mode: quick.

요청 본문
필드형식설명
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

저장된 PDF 또는 DOCX 문서에서 일반 텍스트를 추출합니다.

스코프:DOCUMENTS_READ
경로 매개변수
필드형식설명
documentId필수string
쿼리 매개변수
필드형식설명
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
응답 데이터(200)
필드형식설명
text필수stringThe document text from offset (untrusted content)
documentName필수string
documentType필수string
mimeType필수string | null
characterCount필수integerCharacters in the whole document
wordCount필수integerWords in the whole document
offset필수integer
nextOffset필수integer | nullPass as offset to read on; null when the text ends here
truncated필수booleantrue when the text continues past this slice
curl
curl "https://attorly.ai/api/v1/documents/doc_abc123/text" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/analyses/{analysisId}getAnalysis

저장된 분석(요약, 위험, 주요 조건, 조항, 권장 사항)을 가져옵니다.

스코프:DOCUMENTS_READ
경로 매개변수
필드형식설명
analysisId필수string
응답 데이터(200)
필드형식설명
id필수string
documentId필수string
documentName필수string
summary필수string | null
riskLevel필수"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScore필수number
keyTerms필수array of any
clauses필수array of any
recommendations필수array of any
mode필수stringSINGLE or CONSENSUS
createdAt필수stringISO 8601 date-time
url필수string
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

두 문서 또는 텍스트를 줄 단위로 비교합니다.

스코프:DOCUMENTS_READ
요청 본문
필드형식설명
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
응답 데이터(200)
필드형식설명
differences필수array of object
summary필수object
curl
curl -X POST "https://attorly.ai/api/v1/comparisons" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "sourceDocumentId": "doc_abc123",
  "targetDocumentId": "doc_def456"
}'

조항

GET/api/v1/clausessearchClauses

조항 라이브러리를 검색합니다.

스코프:CLAUSES_READ
쿼리 매개변수
필드형식설명
query필수string
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
응답 데이터(200)
필드형식설명
clauses필수array of object
count필수integer
curl
curl "https://attorly.ai/api/v1/clauses?query=limitation+of+liability&limit=5" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/clauses/risk-assessmentscreateClauseRiskAssessment

조항의 위험을 평가합니다.

스코프:CLAUSES_READ
요청 본문
필드형식설명
clauseText필수string
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …The kind of clause; its risk rules are applied
jurisdictionstringISO 3166-1 alpha-2 country code; defaults to international
contractTypestring
partyRole"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE" | …
응답 데이터(200)
필드형식설명
clauseTextstring
clauseType필수string
jurisdiction필수string
overallRiskScore필수number
riskLevel필수"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactors필수array of object
recommendations필수array of string
alternativesarray of object
complianceIssuesarray of object
negotiationTipsarray of string
curl
curl -X POST "https://attorly.ai/api/v1/clauses/risk-assessments" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "The Supplier’s total liability shall not exceed the fees paid in the preceding month.",
  "category": "LIABILITY",
  "partyRole": "BUYER"
}'
POST/api/v1/clauses/market-comparisonscreateClauseMarketComparison

조항을 시장 표준 문구와 비교합니다.

스코프:CLAUSES_READ
요청 본문
필드형식설명
clauseText필수string
category필수"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
응답 데이터(200)
필드형식설명
inputClause필수string
category필수string
marketStandards필수array of object
comparison필수object
curl
curl -X POST "https://attorly.ai/api/v1/clauses/market-comparisons" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "Either party may terminate this Agreement on 10 days’ written notice.",
  "category": "TERMINATION"
}'
POST/api/v1/clauses/playbook-checkscreateClausePlaybookCheck

플레이북을 기준으로 조항을 점검합니다.

스코프:CLAUSES_READ
요청 본문
필드형식설명
clauseText필수string
playbookId필수string
응답 데이터(200)
필드형식설명
playbookName필수string
compliant필수boolean
violations필수array of string
warnings필수array of string
rulesChecked필수integer
curl
curl -X POST "https://attorly.ai/api/v1/clauses/playbook-checks" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "clauseText": "This Agreement is governed by the laws of England.",
  "playbookId": "pb_abc123"
}'

리서치

POST/api/v1/research/searchessearchResearch

Lovdata, EUR-Lex, CourtListener 등 법률 자료를 검색합니다.

스코프:RESEARCH_READAI 크레딧 사용
요청 본문
필드형식설명
query필수string
jurisdictionsarray of stringISO 3166-1 alpha-2 country code to search under, or "EU"; the first entry is used. Defaults to the key owner's country.
sourcesarray of "lovdata" | "eurlex" | "legislation_uk" | "congress_gov" | "courtlistener" | "finlex"Keep only results from these publishers
dateFromstringKeep only dated results on or after this day
dateTostringKeep only dated results on or before this day
limitinteger
응답 데이터(200)
필드형식설명
query필수string
jurisdiction필수string
results필수array of object
totalCount필수integerResults matching the filters, before limit
sourcesstring
curl
curl -X POST "https://attorly.ai/api/v1/research/searches" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "notice period for terminating a commercial lease",
  "jurisdictions": [
    "NO"
  ],
  "limit": 5
}'
GET/api/v1/research/statutesgetStatute

인용 표기로 법령을 조회합니다.

스코프:RESEARCH_READAI 크레딧 사용
쿼리 매개변수
필드형식설명
citation필수string
jurisdiction필수stringISO 3166-1 alpha-2 country code, or "EU"
응답 데이터(200)
필드형식설명
id필수string
title필수string
source필수string
jurisdictionstring
citationstring
urlstring
datestring
excerptstring
relevanceScorenumber
attributionstring
asOfstring
consolidatedAsOfstringISO date the stored text is "as amended through", as its publisher states
inForceTostringISO date the act stops/stopped being in force, when the publisher states one
repealedAtstringISO date the act was repealed, when it was
lawDatesReadbooleanTrue when the publisher's dates were read for the act; a missing consolidatedAsOf then means an unamended text
curl
curl "https://attorly.ai/api/v1/research/statutes?citation=LOV-1999-03-26-17&jurisdiction=NO" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

수정안

POST/api/v1/redlinescreateRedlines

문서 또는 텍스트에 대한 수정안을 생성합니다.

스코프:REDLINES_GENERATEAI 크레딧 사용
요청 본문
필드형식설명
documentIdstring
contentstring
partyRole필수"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
응답 데이터(200)
필드형식설명
changes필수array of object
summaryobject
negotiationNotesarray of string
statistics필수object
curl
curl -X POST "https://attorly.ai/api/v1/redlines" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentId": "doc_abc123",
  "partyRole": "BUYER",
  "riskTolerance": "CONSERVATIVE"
}'
POST/api/v1/documents/{documentId}/redlines/resolutionsresolveRedlines

문서의 수정 사항을 수락하거나 거부합니다.

스코프:REDLINES_GENERATE
경로 매개변수
필드형식설명
documentId필수string
요청 본문
필드형식설명
changes필수array of object
응답 데이터(200)
필드형식설명
accepted필수integer
rejected필수integer
message필수string
curl
curl -X POST "https://attorly.ai/api/v1/documents/doc_abc123/redlines/resolutions" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "changes": [
    {
      "id": "chg_1",
      "action": "accept"
    },
    {
      "id": "chg_2",
      "action": "reject"
    }
  ]
}'

협상

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

협상 입장을 분석합니다.

스코프:NEGOTIATIONS_READAI 크레딧 사용
요청 본문
필드형식설명
documentIdstring
contentstring
partyRole필수"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
응답 데이터(200)
필드형식설명
overallPosition필수stringFAVORABLE, BALANCED or UNFAVORABLE
positions필수array of object
prioritizedConcessionsarray of string
dealBreakersarray of string
suggestedApproachstring
estimatedOutcomeobject
curl
curl -X POST "https://attorly.ai/api/v1/negotiations/position-analyses" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentId": "doc_abc123",
  "partyRole": "BUYER"
}'
POST/api/v1/negotiations/playbookscreateNegotiationPlaybook

전략을 바탕으로 협상 플레이북을 만듭니다.

스코프:NEGOTIATIONS_READAI 크레딧 사용
요청 본문
필드형식설명
strategy필수object
contextobject
응답 데이터(200)
필드형식설명
playbook필수array of object
anticipatedObjections필수array of object
recommendations필수array of string
summary필수object
curl
curl -X POST "https://attorly.ai/api/v1/negotiations/playbooks" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "strategy": {
    "overallPosition": "collaborative",
    "priorities": [
      "Cap liability at 12 months of fees",
      "Keep Norwegian law"
    ]
  }
}'

워크플로

GET/api/v1/workflows/templateslistWorkflowTemplates

워크플로 템플릿 목록을 조회합니다.

스코프:WORKFLOWS_EXECUTE
쿼리 매개변수
필드형식설명
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

워크플로 실행을 최신순으로 나열합니다. 프로젝트나 상태로 필터링할 수 있습니다.

스코프:WORKFLOWS_EXECUTE
쿼리 매개변수
필드형식설명
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

실사 프로젝트에서 워크플로를 시작합니다.

스코프:WORKFLOWS_EXECUTEAI 크레딧 사용
요청 본문
필드형식설명
templateId필수string
projectId필수string
inputs필수object
optionsobject
응답 데이터(202)
필드형식설명
executionId필수string
templateId필수string
templateName필수string
status필수string
startedAt필수stringISO 8601 date-time
message필수string
curl
curl -X POST "https://attorly.ai/api/v1/workflows/executions" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "templateId": "wft_abc123",
  "projectId": "ddp_abc123",
  "inputs": {}
}'
GET/api/v1/workflows/executions/{executionId}getWorkflowExecution

워크플로 실행 상태를 조회합니다.

스코프:WORKFLOWS_EXECUTE
경로 매개변수
필드형식설명
executionId필수string
쿼리 매개변수
필드형식설명
includeStepsboolean
응답 데이터(200)
필드형식설명
executionId필수string
templateName필수string
status필수string
startedAtstringISO 8601 date-time
completedAtstringISO 8601 date-time
variablesobject
errorstring | null
stepsarray of object
curl
curl "https://attorly.ai/api/v1/workflows/executions/wfx_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

실사

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

실사 프로젝트를 최신순으로 나열합니다.

스코프:DUE_DILIGENCE_FULL
쿼리 매개변수
필드형식설명
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

실사 프로젝트를 만듭니다.

스코프:DUE_DILIGENCE_FULL
요청 본문
필드형식설명
name필수string
dealType필수"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
응답 데이터(201)
필드형식설명
projectId필수string
name필수string
projectType필수string
status필수string
createdAt필수stringISO 8601 date-time
message필수string
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Project Falcon",
  "dealType": "MA_ACQUISITION",
  "targetCompany": "Target AS"
}'
GET/api/v1/due-diligence/projects/{projectId}getDueDiligenceProject

문서 수와 발견 사항 수를 포함한 실사 프로젝트를 가져옵니다.

스코프:DUE_DILIGENCE_FULL
경로 매개변수
필드형식설명
projectId필수string
응답 데이터(200)
필드형식설명
id필수string
name필수string
description필수string | null
projectType필수string
status필수string
priority필수string
targetCompany필수string | null
dueDate필수string | null
documentCount필수integer
findingCount필수integer
createdAt필수stringISO 8601 date-time
updatedAt필수stringISO 8601 date-time
completedAt필수string | null
curl
curl "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/due-diligence/projects/{projectId}/documentsaddDueDiligenceDocuments

실사 프로젝트에 문서를 추가합니다.

스코프:DUE_DILIGENCE_FULL
경로 매개변수
필드형식설명
projectId필수string
요청 본문
필드형식설명
documentIds필수array of string
categorystring
응답 데이터(200)
필드형식설명
projectId필수string
documentsAdded필수integer
totalDocuments필수integer
category필수string
message필수string
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/documents" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "documentIds": [
    "doc_abc123",
    "doc_def456"
  ]
}'
GET/api/v1/due-diligence/projects/{projectId}/findingslistDueDiligenceFindings

실사 프로젝트의 발견 사항 목록을 조회합니다.

스코프:DUE_DILIGENCE_FULL
경로 매개변수
필드형식설명
projectId필수string
쿼리 매개변수
필드형식설명
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
응답 데이터(200)
필드형식설명
projectId필수string
projectName필수string
findings필수array of object
riskSummary필수objectNumber of findings per severity
totalFindings필수integer
pendingProposals필수integerRisks the AI proposed that wait for a reviewer: not findings, not listed, not in any report
curl
curl "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/findings?riskLevel=HIGH" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/due-diligence/projects/{projectId}/reportscreateDueDiligenceReport

실사 보고서를 생성합니다.

스코프:DUE_DILIGENCE_FULL
경로 매개변수
필드형식설명
projectId필수string
요청 본문
필드형식설명
format필수"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
응답 데이터(201)
필드형식설명
reportId필수string
projectId필수string
projectNamestring
format필수"pdf" | "markdown"
status필수string
sectionsarray of string
documentCountinteger
findingCountinteger
pendingProposalsintegerRisks the AI proposed that wait for a reviewer when the report was made: left out of it, and counted at its top
markdown필수string
attachmentobject
messagestring
curl
curl -X POST "https://attorly.ai/api/v1/due-diligence/projects/ddp_abc123/reports" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "format": "markdown"
}'

템플릿 및 초안

GET/api/v1/templateslistTemplates

문서 템플릿 목록을 조회합니다.

스코프:TEMPLATES_READ
쿼리 매개변수
필드형식설명
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

템플릿(mode template) 또는 AI(mode ai)로 초안을 만듭니다.

스코프:TEMPLATES_DRAFTAI 크레딧 사용

본문의 mode 필드로 다음 중 하나를 고릅니다: mode: template, mode: ai.

요청 본문
필드형식설명
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"
  }
}'

사건

GET/api/v1/caseslistCases

내 사건을 최근 변경된 순으로 나열합니다.

스코프:CASES_READ
쿼리 매개변수
필드형식설명
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

사건의 타임라인을 가져옵니다. 각 이벤트의 날짜, 증거, 상대방의 입장이 포함됩니다.

스코프:CASES_READ
경로 매개변수
필드형식설명
caseId필수string
응답 데이터(200)
필드형식설명
case필수object
events필수array of objectIn date order
count필수integer
needsReviewCount필수integerEvents an AI added that no person has confirmed
deletionRequestedCount필수integerEvents waiting for the owner to approve their deletion
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/timeline" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/timeline/eventscreateTimelineEvent

사건의 타임라인에 이벤트를 추가합니다.

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

사건 타임라인의 이벤트를 변경하거나 AI가 추가한 이벤트를 확인합니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
eventId필수string
요청 본문
필드형식설명
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
응답 데이터(200)
필드형식설명
caseId필수string
event필수object
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/timeline/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/api/v1/cases/{caseId}/timeline/events/{eventId}deleteTimelineEvent

사건 타임라인의 이벤트 삭제를 요청합니다. 소유자가 Attorly에서 승인해야만 이벤트가 삭제됩니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
eventId필수string
응답 데이터(200)
필드형식설명
caseId필수string
id필수string
deleted필수booleantrue only when the event is gone
status필수"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

사건의 타임라인을 PDF, Word, ODT, Excel 또는 PowerPoint 파일로 내보냅니다.

스코프:CASES_READ
경로 매개변수
필드형식설명
caseId필수string
요청 본문
필드형식설명
layout필수"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
format필수"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
응답 데이터(200)
필드형식설명
caseId필수string
layout필수"overview" | "chronology" | "numbered" | "visual"
format필수"pdf" | "docx" | "odt" | "xlsx" | "pptx"
locale필수stringThe language the file is written in
eventCount필수integerEvents in the file
exhibitCount필수integerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidential필수integerEvents left out because they are marked confidential
attachment필수object
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/timeline/export" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "layout": "chronology",
  "format": "docx",
  "options": {
    "markAgreement": true
  },
  "locale": "en"
}'
GET/api/v1/cases/{caseId}/deadlineslistCaseDeadlines

사건의 마감일을 가까운 순으로 나열합니다. 각 마감일이 누구의 것인지, 완료되었는지 지났는지가 포함됩니다.

스코프:CASES_READ
경로 매개변수
필드형식설명
caseId필수string
쿼리 매개변수
필드형식설명
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
응답 데이터(200)
필드형식설명
case필수object
deadlines필수array of objectSoonest first
count필수integer
overdueCount필수integer
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/deadlines?status=open" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/deadlinescreateCaseDeadline

사건에 마감일을 추가합니다. 날짜를 지정하거나 기록된 사실로부터 계산합니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
요청 본문
필드형식설명
title필수stringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays days, or + offsetMonths calendar months. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
응답 데이터(201)
필드형식설명
caseId필수string
deadline필수object
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/deadlines" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Protest the termination in writing to the landlord",
  "derivedFrom": {
    "factKey": "receivedAt",
    "offsetMonths": 1
  },
  "kind": "FILING",
  "party": "SELF",
  "notes": "Husleieloven § 9-8 (1): one month from receipt"
}'
PATCH/api/v1/cases/{caseId}/deadlines/{deadlineId}updateCaseDeadline

사건의 마감일을 변경하거나 완료 또는 다시 진행 중으로 표시합니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
deadlineId필수string
요청 본문
필드형식설명
titlestringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays days, or + offsetMonths calendar months. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
completedbooleantrue marks the deadline done; false reopens it
응답 데이터(200)
필드형식설명
caseId필수string
deadline필수object
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/deadlines/dl_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/api/v1/cases/{caseId}/factslistCaseFacts

사건에 기록된 사실을 출처와 함께 나열하고, 사건에 아직 필요한 사실도 보여 줍니다.

스코프:CASES_READ
경로 매개변수
필드형식설명
caseId필수string
응답 데이터(200)
필드형식설명
case필수object
facts필수array of object
count필수integer
caseReads필수object | nullThe facts the case's rule reads, under exactly these keys; null when it reads none
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/facts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/factsrecordCaseFact

사건에 사실을 기록하거나 수정합니다. 그 사실로부터 계산된 마감일도 함께 옮겨집니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
요청 본문
필드형식설명
key필수stringThe fact, as a camelCase key. facts_list names the facts this case reads, with their format; use one of those, or another camelCase key only for a fact none of them covers
value필수stringThe value, in the format its key takes (a date fact: YYYY-MM-DD). It is stored in canonical form, so the result can differ from what was sent ("Lissabon" becomes LIS)
응답 데이터(200)
필드형식설명
caseId필수string
outcome필수"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
fact필수object
movedDeadlines필수array of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
url필수stringWhere the case opens in Attorly
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/facts" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "receivedAt",
  "value": "2026-03-04"
}'
GET/api/v1/cases/{caseId}/partieslistCaseParties

사건의 당사자와 사건에서 사용할 수 있는 역할을 나열합니다.

스코프:CASES_READ
경로 매개변수
필드형식설명
caseId필수string
응답 데이터(200)
필드형식설명
case필수object
parties필수array of object
count필수integer
roles필수array of objectThe roles the case offers; empty when it has no case type with roles
curl
curl "https://attorly.ai/api/v1/cases/case_abc123/parties" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/cases/{caseId}/partiescreateCaseParty

사건의 역할 중 하나에 당사자를 추가합니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
요청 본문
필드형식설명
roleKey필수stringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyType필수"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
name필수stringThe party's name (at most 200 characters)
isSelfbooleantrue when this party is the person the connection acts for; false removes that link
orgNumberstringOrganisation number of an ENTITY
personalIdNumberstringNational identity number of a PERSON. Add it only when the owner gave it for this case
emailstring (email)E-mail address
phonestringPhone number
addressstringPostal address
representedBystringThe lawyer or representative acting for the party
notesstringThe owner's note about the party (at most 1000 characters)
positionintegerOrder within its role, 0 first
응답 데이터(201)
필드형식설명
caseId필수string
party필수object
curl
curl -X POST "https://attorly.ai/api/v1/cases/case_abc123/parties" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "roleKey": "landlord",
  "partyType": "ENTITY",
  "name": "Fjord Eiendom AS",
  "orgNumber": "999999999",
  "email": "[email protected]"
}'
PATCH/api/v1/cases/{caseId}/parties/{partyId}updateCaseParty

사건 당사자의 정보를 변경합니다.

스코프:CASES_WRITE
경로 매개변수
필드형식설명
caseId필수string
partyId필수string
요청 본문
필드형식설명
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
응답 데이터(200)
필드형식설명
caseId필수string
party필수object
curl
curl -X PATCH "https://attorly.ai/api/v1/cases/case_abc123/parties/party_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

작업

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

Prefer 또는 Idempotency-Key와 함께 보낸 요청의 상태와 결과를 가져옵니다.

경로 매개변수
필드형식설명
operationId필수string
응답 데이터(200)
필드형식설명
id필수stringop_…
object필수"operation"
operationId필수stringThe REST operation that was called, e.g. createRedlines
status필수"running" | "awaiting_approval" | "succeeded" | "failed"
livemode필수boolean
idempotencyKeystring | null
resultUrl필수stringWhere to poll: /api/v1/operations/{id}
createdAt필수string (date-time)
completedAt필수string (date-time) | null
expiresAt필수string (date-time)
httpStatus필수integer | null
result필수anyThe data of the successful call
metaobject
error필수object | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

웹훅

GET/api/v1/webhook-endpointslistWebhookEndpoints

키의 조직과 모드에 속한 웹훅 엔드포인트를 나열합니다.

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

웹훅 엔드포인트를 만듭니다. 응답에는 한 번만 표시되는 서명 시크릿이 포함됩니다.

요청 본문
필드형식설명
url필수string (uri)HTTPS URL that receives the events
descriptionstring
enabledEvents필수array of stringEvent types to receive, or ["*"] for all
includeSnapshotsbooleanSend object snapshots instead of thin { id, object } payloads, for operations made with organization API keys (calls made with personal keys and connected apps always send thin payloads). Organization owners and admins only.
응답 데이터(201)
필드형식설명
id필수stringwe_…
object필수"webhook_endpoint"
url필수string
descriptionstring | null
enabledEvents필수array of string
status필수"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemode필수boolean
includeSnapshots필수boolean
apiVersion필수string
failingSincestring (date-time) | null
createdAt필수string (date-time)
updatedAt필수string (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/attorly/webhooks",
  "description": "Production receiver",
  "enabledEvents": [
    "analysis.completed",
    "operation.succeeded",
    "operation.failed"
  ]
}'
GET/api/v1/webhook-endpoints/{endpointId}getWebhookEndpoint

웹훅 엔드포인트를 가져옵니다.

경로 매개변수
필드형식설명
endpointId필수string
응답 데이터(200)
필드형식설명
id필수stringwe_…
object필수"webhook_endpoint"
url필수string
descriptionstring | null
enabledEvents필수array of string
status필수"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemode필수boolean
includeSnapshots필수boolean
apiVersion필수string
failingSincestring (date-time) | null
createdAt필수string (date-time)
updatedAt필수string (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
PATCH/api/v1/webhook-endpoints/{endpointId}updateWebhookEndpoint

엔드포인트의 URL, 이벤트, 스냅샷을 변경하거나 비활성화·활성화합니다.

경로 매개변수
필드형식설명
endpointId필수string
요청 본문
필드형식설명
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
응답 데이터(200)
필드형식설명
id필수stringwe_…
object필수"webhook_endpoint"
url필수string
descriptionstring | null
enabledEvents필수array of string
status필수"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemode필수boolean
includeSnapshots필수boolean
apiVersion필수string
failingSincestring (date-time) | null
createdAt필수string (date-time)
updatedAt필수string (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X PATCH "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
DELETE/api/v1/webhook-endpoints/{endpointId}deleteWebhookEndpoint

웹훅 엔드포인트와 전송 기록을 삭제합니다.

경로 매개변수
필드형식설명
endpointId필수string
응답 데이터(200)
필드형식설명
id필수string
object필수"webhook_endpoint"
deleted필수true
curl
curl -X DELETE "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/webhook-endpoints/{endpointId}/secret-rollsrollWebhookEndpointSecret

서명 시크릿을 교체합니다. 이전 시크릿도 24시간 동안 서명에 사용됩니다.

경로 매개변수
필드형식설명
endpointId필수string
응답 데이터(200)
필드형식설명
id필수stringwe_…
object필수"webhook_endpoint"
url필수string
descriptionstring | null
enabledEvents필수array of string
status필수"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemode필수boolean
includeSnapshots필수boolean
apiVersion필수string
failingSincestring (date-time) | null
createdAt필수string (date-time)
updatedAt필수string (date-time)
secretstringwhsec_… — only when the endpoint is created or its secret rolled
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/secret-rolls" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
POST/api/v1/webhook-endpoints/{endpointId}/test-eventssendWebhookTestEvent

이 엔드포인트에만 webhook_endpoint.test 이벤트를 보냅니다.

경로 매개변수
필드형식설명
endpointId필수string
응답 데이터(202)
필드형식설명
eventId필수string
curl
curl -X POST "https://attorly.ai/api/v1/webhook-endpoints/your_endpointId/test-events" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
GET/api/v1/webhook-endpoints/{endpointId}/deliverieslistWebhookDeliveries

엔드포인트의 전송 내역을 시도와 결과와 함께 최신순으로 나열합니다.

경로 매개변수
필드형식설명
endpointId필수string
쿼리 매개변수
필드형식설명
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"

이벤트

GET/api/v1/eventslistEvents

최근 30일간의 이벤트를 최신순으로 나열합니다.

쿼리 매개변수
필드형식설명
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

웹훅 엔드포인트가 받는 형식으로 이벤트를 가져옵니다.

경로 매개변수
필드형식설명
eventId필수string
응답 데이터(200)
필드형식설명
id필수stringevt_… — also sent as the webhook-id header; deduplicate on it
object필수"event"
type필수"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersion필수string
createdAt필수string (date-time)
livemode필수boolean
data필수object
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

이벤트를 하나의 엔드포인트 또는 이를 구독하는 모든 엔드포인트에 다시 보냅니다.

경로 매개변수
필드형식설명
eventId필수string
요청 본문
필드형식설명
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
응답 데이터(202)
필드형식설명
eventId필수string
deliveriesScheduled필수integer
curl
curl -X POST "https://attorly.ai/api/v1/events/your_eventId/redeliveries" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "endpointId": "we_abc123"
}'

계정, 사용량, 로그

GET/api/v1/organizationgetOrganization

키의 조직: 요금제, AI 크레딧, 기본 관할, 키로 할 수 있는 작업.

응답 데이터(200)
필드형식설명
organization필수object
user필수object
plan필수stringSTANDARD, PRO or ENTERPRISE
billing필수object
defaultJurisdiction필수string | nullISO 3166-1 alpha-2 country used when a document names no governing law
credential필수object
appUrl필수string
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

REST와 MCP의 일별·키별·작업별 요청 수와 오류 수.

쿼리 매개변수
필드형식설명
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

조직의 최근 30일간 API 요청을 최신순으로 나열합니다.

쿼리 매개변수
필드형식설명
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

누가 무엇을 언제 어떤 키로 호출했는지. 조직 소유자와 관리자용입니다.

쿼리 매개변수
필드형식설명
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

조직의 테스트 모드 객체, 이벤트, 작업을 모두 삭제합니다. 테스트 키 전용입니다.

응답 데이터(200)
필드형식설명
object필수"test_data_purge"
deleted필수object
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"