Saltar ao contido principal

Desenvolvedores

Documentación da API REST

Unha API JSON sobre HTTPS para a IA xurídica de Attorly. Executa as mesmas operacións que o servidor MCP, coas mesmas chaves, ámbitos, límites e facturación.

Inicio rápido

Carga un contrato e analízao en catro pasos.

  1. 1. Crea unha chave

    Crea unha chave en Configuración › Desenvolvedores e escolle API REST. A mesma chave serve para o servidor MCP. Gárdaa nunha variable de contorna:

    bash
    export ATTORLY_API_KEY=lbmcp_your_api_key
  2. 2. Carga un documento

    Envía o ficheiro como multipart/form-data. O data.id da resposta é o id do documento. analyze=false gárdao sen iniciar a análise en segundo plano, porque o seguinte paso executa unha.

    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. Analízao

    Prefer: wait=30 agarda ata 30 segundos polo resultado. Unha análise rematada volve como 200 co resultado en data. Se tarda máis, recibes 202 Accepted cunha cabeceira Location que apunta á operación.

    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. Recolle o resultado

    Consulta a operación ata que o seu status sexa succeeded ou failed. A análise está en result. Retry-After indica cantos segundos agardar entre consultas.

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

Autenticación

Envía unha credencial na cabeceira Authorization como token de portador. As chaves de Configuración › Desenvolvedores comezan por lbmcp_ e funcionan en Pro e Enterprise, tanto para a API REST como para o servidor MCP. As chaves de organización de Enterprise comezan por atly_ (atly_rk_ para as chaves restrinxidas, atly_test_ para o modo de proba); as chaves lb_ máis antigas seguen funcionando. As aplicacións que actúan en nome dunha persoa usan OAuth.

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

Ámbitos

Cada punto final precisa os ámbitos que se indican a carón del. Unha chave sen eles recibe 403 insufficient_scope, e requiredScopes no erro enumera todos os ámbitos que a chamada precisa. As chaves de API da organización e OAuth usan estes nomes de ámbito:

ÁmbitoÁmbito da chave de API da organización
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

Erros

Todos os erros teñen a mesma forma: un código estable sobre o que ramificar, unha mensaxe para as persoas e un requestId para citar á asistencia.

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

Cada código explícase, co que facer ao respecto, en a páxina de códigos de erro

Versións

A API ten versións por data. Envía Attorly-Version para escoller unha versión para unha solicitude; sen ela, a solicitude usa a versión coa que se creou a súa chave (as chaves creadas antes das versións usan 2026-10-01). Cada resposta indica que versión respondeu. Os cambios incompatibles só chegan nunha versión nova, e o rexistro de cambios enuméraos.

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

Idempotencia

Envía unha cabeceira Idempotency-Key, por exemplo un UUID, nas solicitudes POST, PATCH e DELETE. Un reintento coa mesma chave e a mesma solicitude devolve a primeira resposta con Idempotent-Replayed: true, e o traballo non se volve executar nin facturar. Unha chave reutilizada para unha solicitude diferente recibe 422 idempotency_key_reused, e unha que aínda se está executando recibe 409 ou, nunha chamada de longa duración, a mesma operación. Os erros do servidor non se almacenan, polo que o seu reintento volve executarse. As chaves consérvanse durante 24 horas.

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

Solicitudes de longa duración

A partir da versión 2026-11-01, as análises completas, os redlines, os playbooks de negociación, os fluxos de traballo, os informes de dilixencia debida e os borradores de IA responden de inmediato con 202 Accepted e unha operación. Envía Prefer: wait=30 para agardar primeiro ata 30 segundos (máximo 60) polo resultado, ou Prefer: respond-async para pedir 202 en calquera escritura. Consulta a Location ata que status sexa succeeded ou failed, ou subscríbete a operation.succeeded. Os resultados consérvanse durante 24 horas. Execútanse como máximo 5 operacións de IA de longa duración á vez por organización; as demais reciben 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", … } }

Paxinación

As listas devolven { object: "list", data, hasMore, nextCursor } e aceptan limit (de 1 a 100, por defecto 20) e cursor. Para obter a seguinte páxina, envía nextCursor como cursor. Na última páxina, nextCursor é null. Os cursores seguen sendo válidos mentres se engaden novos elementos.

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…

Límites de uso

Unha solicitude conta en varias xanelas: o límite por hora da chave, 300 por minuto por persoa, 600 por minuto por organización, un límite por minuto por chave para lecturas, escrituras e chamadas de IA, e o límite propio de cada operación. REST e MCP comparten os mesmos contadores. As cabeceiras RateLimit-Policy e RateLimit mostran todas as xanelas; X-RateLimit-* mostra a que está máis preto de esgotarse. Ao superar un límite recibes 429 con Retry-After.

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

Webhooks

Crea un punto final con POST /api/v1/webhook-endpoints para que che avisen cando remate un traballo, en lugar de consultar. Attorly envía un POST cun evento JSON e asínao segundo Standard Webhooks co segredo whsec_ do punto final. Verifica a sinatura antes de fiarte do corpo, responde 2xx en 15 segundos e deduplica por webhook-id: as entregas fallidas reintentanse durante 72 horas. Podes renovar o segredo, enviar un evento de proba e ver todas as entregas.

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

Modo de proba

As chaves de proba (atly_test_…) acceden a todos os puntos finais, pero traballan con datos de proba separados e devolven resultados de mostra fixos: non se executa IA nin se usan créditos. Unha chave de proba nunca ve datos reais. Pon un valor máxico como __fail_credits__, __fail_consent__ ou __slow__ en calquera campo de texto para obter ese fallo ou atraso. DELETE /api/v1/test-data borra todo o que creou unha chave de proba.

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

As aplicacións que actúan en nome dun usuario de Attorly inician sesión con OAuth 2.1: descubrimento en /.well-known/oauth-authorization-server, rexistro dinámico de clientes e o fluxo de código de autorización con PKCE (S256). Pide resource=https://attorly.ai/api/v1 para obter un token para a API REST; un token emitido para o servidor MCP rexéitase aquí. Engade offline_access para obter un token de actualización. A persoa escolle a organización e pode restrinxir os ámbitos na pantalla de consentimento.

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

Facturación

As operacións que executan IA consumen os mesmos créditos de IA que a aplicación Attorly, da carteira do propietario da chave ou da súa organización, tanto se as chamas por REST como por MCP. Cando se esgotan os créditos recibes 402 insufficient_credits. As chamadas en modo de proba son gratuítas.

Plans

A API inclúese en Pro e Enterprise. Se o plan do propietario da chave xa non inclúe o acceso á API, ou o propietario abandonou a organización, as solicitudes rexéitanse con 403.

Referencia

Todas as operacións, xeradas a partir do documento OpenAPI que serve a API. As rutas son relativas a https://attorly.ai. As respostas correctas envolven o resultado en data. As descricións dos campos están en inglés.

Documentos

GET/api/v1/documentslistDocuments

Enumera os documentos almacenados que pode ler a chave, os máis novos primeiro.

Ámbito:DOCUMENTS_READ
Parámetros da consulta
CampoTipoDescrición
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

Carga un documento como multipart/form-data, ou como JSON con contido en base64 ou texto simple. Analízase en segundo plano a menos que analyze sexa false.

Ámbito:DOCUMENTS_WRITEUsa créditos de IAAcepta cargas de ficheiros
Corpo da solicitude
CampoTipoDescrición
filenameobrigatoriostringThe 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
Datos da resposta (201)
CampoTipoDescrición
idobrigatoriostring
nameobrigatoriostring
originalNameobrigatoriostring
typeobrigatorio"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
sizeobrigatoriointeger
statusobrigatorio"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
analysisQueuedobrigatoriobooleantrue when the background analysis was started
createdAtobrigatoriostringISO 8601 date-time
urlobrigatoriostringWhere 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

Busca no texto dos documentos que pode ler a chave, por significado e por palabras exactas.

Ámbito:DOCUMENTS_READ
Parámetros da consulta
CampoTipoDescrición
queryobrigatoriostringWhat 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

Obtén un documento, o seu estado de procesamento e a súa última análise.

Ámbito:DOCUMENTS_READ
Parámetros da ruta
CampoTipoDescrición
documentIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostring
nameobrigatoriostring
originalNameobrigatoriostring
typeobrigatorio"EMPLOYMENT_CONTRACT" | "LEASE_AGREEMENT" | "PURCHASE_AGREEMENT" | "NDA" | "TERMS_OF_SERVICE" | "EMAIL" | …
mimeTypeobrigatoriostring
sizeobrigatoriointeger
statusobrigatorio"PENDING" | "PROCESSING" | "ANALYZED" | "FAILED"PENDING until processing starts; ANALYZED once the analysis is stored
archivedobrigatorioboolean
ownedByYouobrigatorioboolean
versionNumberobrigatoriointeger | 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.
createdAtobrigatoriostringISO 8601 date-time
updatedAtobrigatoriostringISO 8601 date-time
fileAvailableobrigatoriobooleanfalse when the stored file can no longer be read
governingLawRequiredobrigatoriobooleantrue when the analysis is held until a governing law is chosen for the document in Attorly
latestAnalysisobrigatorioobject | null
urlobrigatoriostringWhere 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

Solicita eliminar un documento propio. O documento só se elimina cando o apruebas en Attorly.

Ámbito:DOCUMENTS_DELETE
Parámetros da ruta
CampoTipoDescrición
documentIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostring
deletedobrigatoriobooleantrue only when the document is gone
statusobrigatorio"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

Analiza un documento ou un texto en liña. mode é full (documento almacenado) ou quick.

Ámbito:DOCUMENTS_ANALYZEDOCUMENTS_READUsa créditos de IA

O campo mode do corpo escolle unha destas: mode: full, mode: quick.

Corpo da solicitude
CampoTipoDescrición
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

Enumera as análises almacenadas dun documento, as máis novas primeiro.

Ámbito:DOCUMENTS_READ
Parámetros da ruta
CampoTipoDescrición
documentIdobrigatoriostring
Parámetros da consulta
CampoTipoDescrición
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

Analiza un documento almacenado.

Ámbito:DOCUMENTS_ANALYZEDOCUMENTS_READUsa créditos de IA
Parámetros da ruta
CampoTipoDescrición
documentIdobrigatoriostring

O campo mode do corpo escolle unha destas: mode: full, mode: quick.

Corpo da solicitude
CampoTipoDescrición
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

Extrae o texto simple dun documento PDF ou DOCX almacenado.

Ámbito:DOCUMENTS_READ
Parámetros da ruta
CampoTipoDescrición
documentIdobrigatoriostring
Parámetros da consulta
CampoTipoDescrición
offsetintegerCharacter offset to start from; pass the nextOffset of the previous call to read on
maxCharactersintegerMost characters to return in this call
Datos da resposta (200)
CampoTipoDescrición
textobrigatoriostringThe document text from offset (untrusted content)
documentNameobrigatoriostring
documentTypeobrigatoriostring
mimeTypeobrigatoriostring | null
characterCountobrigatoriointegerCharacters in the whole document
wordCountobrigatoriointegerWords in the whole document
offsetobrigatoriointeger
nextOffsetobrigatoriointeger | nullPass as offset to read on; null when the text ends here
truncatedobrigatoriobooleantrue 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

Obtén unha análise almacenada: resumo, risco, termos clave, cláusulas e recomendacións.

Ámbito:DOCUMENTS_READ
Parámetros da ruta
CampoTipoDescrición
analysisIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostring
documentIdobrigatoriostring
documentNameobrigatoriostring
summaryobrigatoriostring | null
riskLevelobrigatorio"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskScoreobrigatorionumber
keyTermsobrigatorioarray of any
clausesobrigatorioarray of any
recommendationsobrigatorioarray of any
modeobrigatoriostringSINGLE or CONSENSUS
createdAtobrigatoriostringISO 8601 date-time
urlobrigatoriostring
curl
curl "https://attorly.ai/api/v1/analyses/your_analysisId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/comparisonscreateComparison

Compara dous documentos ou textos liña por liña.

Ámbito:DOCUMENTS_READ
Corpo da solicitude
CampoTipoDescrición
sourceDocumentIdstring
sourceContentstring
targetDocumentIdstring
targetContentstring
Datos da resposta (200)
CampoTipoDescrición
differencesobrigatorioarray of object
summaryobrigatorioobject
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"
}'

Cláusulas

GET/api/v1/clausessearchClauses

Busca na biblioteca de cláusulas.

Ámbito:CLAUSES_READ
Parámetros da consulta
CampoTipoDescrición
queryobrigatoriostring
category"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
jurisdictionstring
riskLevel"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
limitinteger
Datos da resposta (200)
CampoTipoDescrición
clausesobrigatorioarray of object
countobrigatoriointeger
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

Avalía o risco dunha cláusula.

Ámbito:CLAUSES_READ
Corpo da solicitude
CampoTipoDescrición
clauseTextobrigatoriostring
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" | …
Datos da resposta (200)
CampoTipoDescrición
clauseTextstring
clauseTypeobrigatoriostring
jurisdictionobrigatoriostring
overallRiskScoreobrigatorionumber
riskLevelobrigatorio"LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
riskFactorsobrigatorioarray of object
recommendationsobrigatorioarray 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

Compara unha cláusula coa redacción estándar do mercado.

Ámbito:CLAUSES_READ
Corpo da solicitude
CampoTipoDescrición
clauseTextobrigatoriostring
categoryobrigatorio"INDEMNIFICATION" | "LIABILITY" | "TERMINATION" | "CONFIDENTIALITY" | "INTELLECTUAL_PROPERTY" | "PAYMENT" | …
contractTypestring
jurisdictionstring
Datos da resposta (200)
CampoTipoDescrición
inputClauseobrigatoriostring
categoryobrigatoriostring
marketStandardsobrigatorioarray of object
comparisonobrigatorioobject
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

Comproba unha cláusula fronte a un playbook.

Ámbito:CLAUSES_READ
Corpo da solicitude
CampoTipoDescrición
clauseTextobrigatoriostring
playbookIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
playbookNameobrigatoriostring
compliantobrigatorioboolean
violationsobrigatorioarray of string
warningsobrigatorioarray of string
rulesCheckedobrigatoriointeger
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"
}'

Investigación

POST/api/v1/research/searchessearchResearch

Busca en fontes xurídicas como Lovdata, EUR-Lex e CourtListener.

Ámbito:RESEARCH_READUsa créditos de IA
Corpo da solicitude
CampoTipoDescrición
queryobrigatoriostring
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
Datos da resposta (200)
CampoTipoDescrición
queryobrigatoriostring
jurisdictionobrigatoriostring
resultsobrigatorioarray of object
totalCountobrigatoriointegerResults 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

Consulta unha lei pola súa cita.

Ámbito:RESEARCH_READUsa créditos de IA
Parámetros da consulta
CampoTipoDescrición
citationobrigatoriostring
jurisdictionobrigatoriostringISO 3166-1 alpha-2 country code, or "EU"
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostring
titleobrigatoriostring
sourceobrigatoriostring
jurisdictionstring
citationstring
urlstring
datestring
excerptstring
relevanceScorenumber
attributionstring
asOfstring
consolidatedAsOfstringISO date the stored text is "as amended through", as its publisher states
inForceTostringISO date the act stops/stopped being in force, when the publisher states one
repealedAtstringISO date the act was repealed, when it was
lawDatesReadbooleanTrue when the publisher's dates were read for the act; a missing consolidatedAsOf then means an unamended text
curl
curl "https://attorly.ai/api/v1/research/statutes?citation=LOV-1999-03-26-17&jurisdiction=NO" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Redlines

POST/api/v1/redlinescreateRedlines

Xera suxestións de redline para un documento ou texto.

Ámbito:REDLINES_GENERATEUsa créditos de IA
Corpo da solicitude
CampoTipoDescrición
documentIdstring
contentstring
partyRoleobrigatorio"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
Datos da resposta (200)
CampoTipoDescrición
changesobrigatorioarray of object
summaryobject
negotiationNotesarray of string
statisticsobrigatorioobject
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

Acepta ou rexeita cambios de redline nun documento.

Ámbito:REDLINES_GENERATE
Parámetros da ruta
CampoTipoDescrición
documentIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
changesobrigatorioarray of object
Datos da resposta (200)
CampoTipoDescrición
acceptedobrigatoriointeger
rejectedobrigatoriointeger
messageobrigatoriostring
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"
    }
  ]
}'

Negociacións

POST/api/v1/negotiations/position-analysescreateNegotiationPositionAnalysis

Analiza unha posición de negociación.

Ámbito:NEGOTIATIONS_READUsa créditos de IA
Corpo da solicitude
CampoTipoDescrición
documentIdstring
contentstring
partyRoleobrigatorio"BUYER" | "SELLER" | "LANDLORD" | "TENANT" | "EMPLOYER" | "EMPLOYEE"
contextobject
Datos da resposta (200)
CampoTipoDescrición
overallPositionobrigatoriostringFAVORABLE, BALANCED or UNFAVORABLE
positionsobrigatorioarray 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

Constrúe un playbook de negociación a partir dunha estratexia.

Ámbito:NEGOTIATIONS_READUsa créditos de IA
Corpo da solicitude
CampoTipoDescrición
strategyobrigatorioobject
contextobject
Datos da resposta (200)
CampoTipoDescrición
playbookobrigatorioarray of object
anticipatedObjectionsobrigatorioarray of object
recommendationsobrigatorioarray of string
summaryobrigatorioobject
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"
    ]
  }
}'

Fluxos de traballo

GET/api/v1/workflows/templateslistWorkflowTemplates

Enumera os modelos de fluxo de traballo.

Ámbito:WORKFLOWS_EXECUTE
Parámetros da consulta
CampoTipoDescrición
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

Enumera as execucións de fluxos de traballo, as máis novas primeiro, opcionalmente para un proxecto ou estado.

Ámbito:WORKFLOWS_EXECUTE
Parámetros da consulta
CampoTipoDescrición
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

Inicia un fluxo de traballo nun proxecto de dilixencia debida.

Ámbito:WORKFLOWS_EXECUTEUsa créditos de IA
Corpo da solicitude
CampoTipoDescrición
templateIdobrigatoriostring
projectIdobrigatoriostring
inputsobrigatorioobject
optionsobject
Datos da resposta (202)
CampoTipoDescrición
executionIdobrigatoriostring
templateIdobrigatoriostring
templateNameobrigatoriostring
statusobrigatoriostring
startedAtobrigatoriostringISO 8601 date-time
messageobrigatoriostring
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

Obtén o estado dunha execución de fluxo de traballo.

Ámbito:WORKFLOWS_EXECUTE
Parámetros da ruta
CampoTipoDescrición
executionIdobrigatoriostring
Parámetros da consulta
CampoTipoDescrición
includeStepsboolean
Datos da resposta (200)
CampoTipoDescrición
executionIdobrigatoriostring
templateNameobrigatoriostring
statusobrigatoriostring
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"

Dilixencia debida

GET/api/v1/due-diligence/projectslistDueDiligenceProjects

Enumera os proxectos de dilixencia debida, os máis novos primeiro.

Ámbito:DUE_DILIGENCE_FULL
Parámetros da consulta
CampoTipoDescrición
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

Crea un proxecto de dilixencia debida.

Ámbito:DUE_DILIGENCE_FULL
Corpo da solicitude
CampoTipoDescrición
nameobrigatoriostring
dealTypeobrigatorio"MA_ACQUISITION" | "MA_MERGER" | "INVESTMENT" | "IPO" | "REAL_ESTATE" | "REGULATORY" | …
targetCompanystring
descriptionstring
settingsobject
Datos da resposta (201)
CampoTipoDescrición
projectIdobrigatoriostring
nameobrigatoriostring
projectTypeobrigatoriostring
statusobrigatoriostring
createdAtobrigatoriostringISO 8601 date-time
messageobrigatoriostring
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

Obtén un proxecto de dilixencia debida cos seus recontos de documentos e constatacións.

Ámbito:DUE_DILIGENCE_FULL
Parámetros da ruta
CampoTipoDescrición
projectIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostring
nameobrigatoriostring
descriptionobrigatoriostring | null
projectTypeobrigatoriostring
statusobrigatoriostring
priorityobrigatoriostring
targetCompanyobrigatoriostring | null
dueDateobrigatoriostring | null
documentCountobrigatoriointeger
findingCountobrigatoriointeger
createdAtobrigatoriostringISO 8601 date-time
updatedAtobrigatoriostringISO 8601 date-time
completedAtobrigatoriostring | 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

Engade documentos a un proxecto de dilixencia debida.

Ámbito:DUE_DILIGENCE_FULL
Parámetros da ruta
CampoTipoDescrición
projectIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
documentIdsobrigatorioarray of string
categorystring
Datos da resposta (200)
CampoTipoDescrición
projectIdobrigatoriostring
documentsAddedobrigatoriointeger
totalDocumentsobrigatoriointeger
categoryobrigatoriostring
messageobrigatoriostring
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

Enumera as constatacións dun proxecto de dilixencia debida.

Ámbito:DUE_DILIGENCE_FULL
Parámetros da ruta
CampoTipoDescrición
projectIdobrigatoriostring
Parámetros da consulta
CampoTipoDescrición
riskLevel"INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL"
categorystring
limitinteger
Datos da resposta (200)
CampoTipoDescrición
projectIdobrigatoriostring
projectNameobrigatoriostring
findingsobrigatorioarray of object
riskSummaryobrigatorioobjectNumber of findings per severity
totalFindingsobrigatoriointeger
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

Xera un informe de dilixencia debida.

Ámbito:DUE_DILIGENCE_FULL
Parámetros da ruta
CampoTipoDescrición
projectIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
formatobrigatorio"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
Datos da resposta (201)
CampoTipoDescrición
reportIdobrigatoriostring
projectIdobrigatoriostring
projectNamestring
formatobrigatorio"pdf" | "markdown"
statusobrigatoriostring
sectionsarray of string
documentCountinteger
findingCountinteger
markdownobrigatoriostring
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"
}'

Modelos e borradores

GET/api/v1/templateslistTemplates

Enumera os modelos de documentos.

Ámbito:TEMPLATES_READ
Parámetros da consulta
CampoTipoDescrición
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

Crea un borrador a partir dun modelo (mode template) ou con IA (mode ai).

Ámbito:TEMPLATES_DRAFTUsa créditos de IA

O campo mode do corpo escolle unha destas: mode: template, mode: ai.

Corpo da solicitude
CampoTipoDescrición
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"
  }
}'

Casos

GET/api/v1/caseslistCases

Enumera os teus casos, os cambiados máis recentemente primeiro.

Ámbito:CASES_READ
Parámetros da consulta
CampoTipoDescrición
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

Obtén a cronoloxía dun caso: cada evento coa súa data, as súas probas e a posición da outra parte.

Ámbito:CASES_READ
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
caseobrigatorioobject
eventsobrigatorioarray of objectIn date order
countobrigatoriointeger
needsReviewCountobrigatoriointegerEvents an AI added that no person has confirmed
deletionRequestedCountobrigatoriointegerEvents 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

Engade un evento á cronoloxía dun caso.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
titleobrigatoriostringWhat happened, in one line (at most 300 characters)
descriptionstring | nullMore detail, or null to clear it
whenobrigatorioobjectWhen 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
Datos da resposta (201)
CampoTipoDescrición
caseIdobrigatoriostring
eventobrigatorioobject
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

Cambia un evento da cronoloxía dun caso, ou confirma un que engadiu unha IA.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
eventIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
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
Datos da resposta (200)
CampoTipoDescrición
caseIdobrigatoriostring
eventobrigatorioobject
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

Solicita eliminar un evento da cronoloxía dun caso. O evento só se elimina cando o propietario o aproba en Attorly.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
eventIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
caseIdobrigatoriostring
idobrigatoriostring
deletedobrigatoriobooleantrue only when the event is gone
statusobrigatorio"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

Exporta a cronoloxía dun caso como ficheiro PDF, Word, ODT, Excel ou PowerPoint.

Ámbito:CASES_READ
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
layoutobrigatorio"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
formatobrigatorio"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
Datos da resposta (200)
CampoTipoDescrición
caseIdobrigatoriostring
layoutobrigatorio"overview" | "chronology" | "numbered" | "visual"
formatobrigatorio"pdf" | "docx" | "odt" | "xlsx" | "pptx"
localeobrigatoriostringThe language the file is written in
eventCountobrigatoriointegerEvents in the file
exhibitCountobrigatoriointegerDocuments in the exhibit list (chronology and numbered layouts)
leftOutConfidentialobrigatoriointegerEvents left out because they are marked confidential
attachmentobrigatorioobject
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

Enumera os prazos dun caso, os máis próximos primeiro, indicando de quen é cada prazo e se está feito ou vencido.

Ámbito:CASES_READ
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Parámetros da consulta
CampoTipoDescrición
status"open" | "completed"open: not yet marked done; completed: marked done; both when absent
Datos da resposta (200)
CampoTipoDescrición
caseobrigatorioobject
deadlinesobrigatorioarray of objectSoonest first
countobrigatoriointeger
overdueCountobrigatoriointeger
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

Engade un prazo a un caso, nunha data determinada ou contado a partir dun feito rexistrado.

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

Cambia un prazo dun caso, ou márcao como feito ou aberto de novo.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
deadlineIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
titlestringWhat must be done by then, in one line (at most 200 characters)
dueAtstring (date) | string (date-time)The due date. A day "YYYY-MM-DD" is due at the end of that day where the case applies (its country, else the owner's); a moment ("2026-03-02T09:00:00+01:00", a hearing) is kept as given
derivedFromobjectCount the date from a recorded date fact instead of giving dueAt: due = the fact's date + offsetDays. The deadline moves with the fact when the fact is corrected. Record the fact first with facts_record
kind"HEARING" | "FILING" | "DISCOVERY" | "STATUTE_OF_LIMITATIONS" | "CUSTOM"What kind of deadline it is; CUSTOM when absent
party"SELF" | "COUNTERPARTY"SELF: the owner must act by then. COUNTERPARTY: a window the other side set; SELF when absent
notesstring | nullA short note shown with the deadline and in its reminders (at most 500 characters), or null to clear it
completedbooleantrue marks the deadline done; false reopens it
Datos da resposta (200)
CampoTipoDescrición
caseIdobrigatoriostring
deadlineobrigatorioobject
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

Enumera os feitos rexistrados nun caso, coa súa fonte, e os feitos que o caso aínda precisa.

Ámbito:CASES_READ
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
caseobrigatorioobject
factsobrigatorioarray of object
countobrigatoriointeger
caseReadsobrigatorioobject | 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

Rexistra un feito nun caso, ou corríxeo. Os prazos contados a partir del móvense con el.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
keyobrigatoriostringThe 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
valueobrigatoriostringThe 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)
Datos da resposta (200)
CampoTipoDescrición
caseIdobrigatoriostring
outcomeobrigatorio"recorded" | "corrected" | "unchanged"recorded: a new fact; corrected: a new value replaced the old one; unchanged: it already held this value
factobrigatorioobject
movedDeadlinesobrigatorioarray of objectOpen deadlines counted from the fact that moved with the correction, due days before and after
urlobrigatoriostringWhere 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

Enumera as partes dun caso e os roles que ofrece o caso.

Ámbito:CASES_READ
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
caseobrigatorioobject
partiesobrigatorioarray of object
countobrigatoriointeger
rolesobrigatorioarray 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

Engade unha parte a un caso, nun dos seus roles.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
roleKeyobrigatoriostringThe role the party has in the case, as one of the roles parties_list returns (e.g. "landlord")
partyTypeobrigatorio"PERSON" | "ENTITY"PERSON for a person, ENTITY for a company or public body
nameobrigatoriostringThe 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
Datos da resposta (201)
CampoTipoDescrición
caseIdobrigatoriostring
partyobrigatorioobject
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

Cambia os datos dunha parte nun caso.

Ámbito:CASES_WRITE
Parámetros da ruta
CampoTipoDescrición
caseIdobrigatoriostring
partyIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
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
Datos da resposta (200)
CampoTipoDescrición
caseIdobrigatoriostring
partyobrigatorioobject
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)"

Operacións

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

Obtén o estado e o resultado dunha solicitude enviada con Prefer ou Idempotency-Key.

Parámetros da ruta
CampoTipoDescrición
operationIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostringop_…
objectobrigatorio"operation"
operationIdobrigatoriostringThe REST operation that was called, e.g. createRedlines
statusobrigatorio"running" | "awaiting_approval" | "succeeded" | "failed"
livemodeobrigatorioboolean
idempotencyKeystring | null
resultUrlobrigatoriostringWhere to poll: /api/v1/operations/{id}
createdAtobrigatoriostring (date-time)
completedAtobrigatoriostring (date-time) | null
expiresAtobrigatoriostring (date-time)
httpStatusobrigatoriointeger | null
resultobrigatorioanyThe data of the successful call
metaobject
errorobrigatorioobject | null
curl
curl "https://attorly.ai/api/v1/operations/op_abc123" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"

Webhooks

GET/api/v1/webhook-endpointslistWebhookEndpoints

Enumera os puntos finais de webhook da organización e do modo da chave.

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

Crea un punto final de webhook. A resposta contén o seu segredo de sinatura, que se mostra unha soa vez.

Corpo da solicitude
CampoTipoDescrición
urlobrigatoriostring (uri)HTTPS URL that receives the events
descriptionstring
enabledEventsobrigatorioarray 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.
Datos da resposta (201)
CampoTipoDescrición
idobrigatoriostringwe_…
objectobrigatorio"webhook_endpoint"
urlobrigatoriostring
descriptionstring | null
enabledEventsobrigatorioarray of string
statusobrigatorio"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobrigatorioboolean
includeSnapshotsobrigatorioboolean
apiVersionobrigatoriostring
failingSincestring (date-time) | null
createdAtobrigatoriostring (date-time)
updatedAtobrigatoriostring (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

Obtén un punto final de webhook.

Parámetros da ruta
CampoTipoDescrición
endpointIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostringwe_…
objectobrigatorio"webhook_endpoint"
urlobrigatoriostring
descriptionstring | null
enabledEventsobrigatorioarray of string
statusobrigatorio"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobrigatorioboolean
includeSnapshotsobrigatorioboolean
apiVersionobrigatoriostring
failingSincestring (date-time) | null
createdAtobrigatoriostring (date-time)
updatedAtobrigatoriostring (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

Cambia a URL, os eventos ou as instantáneas dun punto final, ou desactívao e actívao.

Parámetros da ruta
CampoTipoDescrición
endpointIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
urlstring (uri)
descriptionstring | null
enabledEventsarray of string
includeSnapshotsboolean
status"enabled" | "disabled"Disable to pause deliveries; enable to resume
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostringwe_…
objectobrigatorio"webhook_endpoint"
urlobrigatoriostring
descriptionstring | null
enabledEventsobrigatorioarray of string
statusobrigatorio"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobrigatorioboolean
includeSnapshotsobrigatorioboolean
apiVersionobrigatoriostring
failingSincestring (date-time) | null
createdAtobrigatoriostring (date-time)
updatedAtobrigatoriostring (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

Elimina un punto final de webhook e o seu historial de entregas.

Parámetros da ruta
CampoTipoDescrición
endpointIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostring
objectobrigatorio"webhook_endpoint"
deletedobrigatoriotrue
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

Substitúe o segredo de sinatura. O antigo segue asinando durante 24 horas.

Parámetros da ruta
CampoTipoDescrición
endpointIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostringwe_…
objectobrigatorio"webhook_endpoint"
urlobrigatoriostring
descriptionstring | null
enabledEventsobrigatorioarray of string
statusobrigatorio"enabled" | "disabled"
disabledReasonstring | nulldisabled_by_user or failing_deliveries
livemodeobrigatorioboolean
includeSnapshotsobrigatorioboolean
apiVersionobrigatoriostring
failingSincestring (date-time) | null
createdAtobrigatoriostring (date-time)
updatedAtobrigatoriostring (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

Envía un evento webhook_endpoint.test só a este punto final.

Parámetros da ruta
CampoTipoDescrición
endpointIdobrigatoriostring
Datos da resposta (202)
CampoTipoDescrición
eventIdobrigatoriostring
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

Enumera as entregas dun punto final, as máis novas primeiro, cos seus intentos e resultado.

Parámetros da ruta
CampoTipoDescrición
endpointIdobrigatoriostring
Parámetros da consulta
CampoTipoDescrición
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"

Eventos

GET/api/v1/eventslistEvents

Enumera os eventos dos últimos 30 días, os máis novos primeiro.

Parámetros da consulta
CampoTipoDescrición
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

Obtén un evento tal como o reciben os puntos finais de webhook.

Parámetros da ruta
CampoTipoDescrición
eventIdobrigatoriostring
Datos da resposta (200)
CampoTipoDescrición
idobrigatoriostringevt_… — also sent as the webhook-id header; deduplicate on it
objectobrigatorio"event"
typeobrigatorio"analysis.completed" | "analysis.failed" | "redlines.generated" | "due_diligence.report.completed" | "operation.succeeded" | "operation.failed" | …
apiVersionobrigatoriostring
createdAtobrigatoriostring (date-time)
livemodeobrigatorioboolean
dataobrigatorioobject
curl
curl "https://attorly.ai/api/v1/events/your_eventId" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
POST/api/v1/events/{eventId}/redeliveriesredeliverEvent

Envía un evento de novo, a un punto final ou a todos os puntos finais subscritos a el.

Parámetros da ruta
CampoTipoDescrición
eventIdobrigatoriostring
Corpo da solicitude
CampoTipoDescrición
endpointIdstringOnly this endpoint; default every endpoint subscribed to the event
Datos da resposta (202)
CampoTipoDescrición
eventIdobrigatoriostring
deliveriesScheduledobrigatoriointeger
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"
}'

Conta, uso e rexistros

GET/api/v1/organizationgetOrganization

A organización da chave: plan, créditos de IA, xurisdición por defecto e o que pode facer a chave.

Datos da resposta (200)
CampoTipoDescrición
organizationobrigatorioobject
userobrigatorioobject
planobrigatoriostringSTANDARD, PRO or ENTERPRISE
billingobrigatorioobject
defaultJurisdictionobrigatoriostring | nullISO 3166-1 alpha-2 country used when a document names no governing law
credentialobrigatorioobject
appUrlobrigatoriostring
curl
curl "https://attorly.ai/api/v1/organization" \
  -H "Authorization: Bearer $ATTORLY_API_KEY"
GET/api/v1/usagegetUsage

Solicitudes por día, chave e operación, cos recontos de erros, por REST e MCP.

Parámetros da consulta
CampoTipoDescrición
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

Enumera as solicitudes de API da organización dos últimos 30 días, as máis novas primeiro.

Parámetros da consulta
CampoTipoDescrición
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

Quen chamou a que, cando e con que chave. Para propietarios e administradores da organización.

Parámetros da consulta
CampoTipoDescrición
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

Elimina todos os obxectos, eventos e operacións do modo de proba da organización. Só chaves de proba.

Datos da resposta (200)
CampoTipoDescrición
objectobrigatorio"test_data_purge"
deletedobrigatorioobject
curl
curl -X DELETE "https://attorly.ai/api/v1/test-data" \
  -H "Authorization: Bearer $ATTORLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"