Към основното съдържание

Разработчици

REST API документация

API с JSON през HTTPS за правния AI на Attorly. Изпълнява същите операции като MCP сървъра, със същите ключове, права, ограничения и таксуване.

Бърз старт

Качете договор и го анализирайте в четири стъпки.

  1. 1. Създайте ключ

    Създайте ключ в Настройки › Разработчици и изберете REST API. Същият ключ работи за MCP сървъра. Пазете го в променлива на средата:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Качете документ

    Изпратете файла като multipart/form-data. data.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. Ако отнеме повече време, получавате 202 Accepted със заглавка Location, сочеща към операцията.

    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

Права (scopes)

Всяка крайна точка изисква правата, посочени до нея. Ключ без тях получава 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_…

Идемпотентност

Изпращайте заглавка Idempotency-Key, например UUID, при заявки POST, PATCH и DELETE. Повторен опит със същия ключ и същата заявка получава първия отговор с 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 пълните анализи, redline корекциите, плановете за преговори, работните потоци, докладите за due diligence и AI черновите отговарят веднага с 202 Accepted и операция. Изпратете Prefer: wait=30, за да изчакате първо резултата до 30 секунди (най-много 60), или Prefer: respond-async, за да поискате 202 за всеки запис. Проверявайте Location, докато статусът стане succeeded или failed, или се абонирайте за operation.succeeded. Резултатите се пазят 24 часа. Една организация изпълнява най-много 5 дълги AI операции едновременно; останалите получават 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-* показва най-близкия до изчерпване. Над лимит получавате 429 с Retry-After.

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

Уебхукове

Създайте крайна точка с POST /api/v1/webhook-endpoints, за да получавате известие, когато работата приключи, вместо да проверявате. Attorly изпраща POST със събитие в JSON, подписано по Standard Webhooks с тайната whsec_ на крайната точка. Проверете подписа, преди да се доверите на съдържанието, отговорете с 2xx до 15 секунди и премахвайте дубликати по 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). Поискайте resource=https://attorly.ai/api/v1, за да получите токен за REST API; токен, издаден за 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 използват същите AI кредити като приложението Attorly, от портфейла на собственика на ключа или на неговата организация, независимо дали ги извиквате през REST или MCP. Когато кредитите свършат, получавате 402 insufficient_credits. Заявките в тестов режим са безплатни.

Планове

API е включен в Pro и Enterprise. Ако планът на собственика на ключа вече не включва достъп до API или собственикът е напуснал организацията, заявките се отхвърлят с 403.

Справка

Всяка операция, генерирана от OpenAPI документа, който самото API предоставя. Пътищата са относителни спрямо 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 или като JSON със съдържание в base64 или обикновен текст. Анализира се във фонов режим, освен ако analyze е false.

Право:DOCUMENTS_WRITEИзползва ИИ кредитиПриема качване на файлове
Тяло на заявката
ПолеТипОписание
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_READИзползва ИИ кредити

Полето 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_READИзползва ИИ кредити
Параметри на пътя
ПолеТипОписание
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_READИзползва ИИ кредити
Тяло на заявката
ПолеТипОписание
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_READИзползва ИИ кредити
Параметри на заявката
ПолеТипОписание
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_GENERATEИзползва ИИ кредити
Тяло на заявката
ПолеТипОписание
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_READИзползва ИИ кредити
Тяло на заявката
ПолеТипОписание
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_READИзползва ИИ кредити
Тяло на заявката
ПолеТипОписание
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_EXECUTEИзползва ИИ кредити
Тяло на заявката
ПолеТипОписание
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, от най-новия.

Право: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 с броя документи и констатации.

Право: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_DRAFTИзползва ИИ кредити

Полето 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

Промяна на събитие в хронологията на случай или потвърждаване на събитие, добавено от ИИ.

Право: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

Списък с API заявките на организацията за последните 30 дни, от най-новата.

Параметри на заявката
ПолеТипОписание
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)"