Skip to content
concord.app
Book a demo
esc
concord.app
Book a demo

API reference

Intelligence. 5 operations.

The Intelligence operations of the concord.app REST API, each with its parameters, body fields and responses.

Intelligence — AI negotiation, diff, playbook and relationship analysis.

Every path is on https://app.concord.app.

GET/api/v1/intelligence/anomalies

Detect anomalies in one document against portfolio baselines

Compares one agreement's extracted money and term values against percentile baselines (p10 / p25 / median / p75 / p90) computed over up to 100 other standard-v3 extractions in the same organization, and returns the fields that fall outside them with a deviation type and a severity. It analyses the one agreement you name, not the portfolio: the rest of the portfolio is only the baseline, and Confidential workspace agreements are excluded from it. Statistical, not generative — no model is called, no AI budget is spent, and nothing is written. An agreement with no standard-v3 extraction yet comes back empty rather than failing.

Parameters

NameInTypeDescription
agreement_id
required
query string
contract_type query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/intelligence/diff

Diff a document against its previous version or closest match

Compares an agreement's extracted fields against the previous version — or, when no previous agreement is given, against the closest matching document the service selects itself — and returns a field-by-field diff with a materiality grade. CALLS THE AI ON REQUEST: with use_llm_refinement set and at least one ambiguous administrative change present, the service makes a live LLM call to re-grade those changes, inside the organization's short-term AI allowance. Without that flag, and when there is nothing ambiguous to re-grade, no AI call is made. Nothing is created or changed.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
current_agreement_id
required
string
previous_agreement_id string
use_llm_refinement boolean

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Intelligence analysis is not permitted for this organization (feature disabled or AI processing off)
404404 — NOT_FOUND: The intelligence record (or a resource it depends on, e.g. document content) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/intelligence/feedback

Record risk-flag or summary feedback on a document

Appends one AI-quality feedback row to an agreement: a dismissed risk flag, a confirmed risk flag, or an edited AI summary, recording what the AI said next to what the human said. The row is permanent — no API operation edits or deletes it, and only a retention or erasure job removes it. It does NOT feed the extraction-accuracy metrics: those are computed from field-level accept / override / reject corrections, which are recorded by documentManagement.recordFieldFeedback, not here. Size limits, because the row is permanent: fieldName at most 200 characters, aiValue and humanValue at most 10000 each, and metadata must be JSON-serializable and serialize to at most 10000 characters.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_id
required
string
event_type
required
one of "risk_flag_dismissed", "risk_flag_confirmed", "summary_edited"
field_name string
ai_value string When the field is a contract-term amount (a term whose catalog kind is money, such as the total contract value) and the value is a bare number, that number is an integer count of the currency's smallest step, sent as text (e.g. 5000000 = 50,000.00), never with a fraction; a formatted amount ($50,000, USD 50k) and the value of any other field are read as written.
human_value string When the field is a contract-term amount (a term whose catalog kind is money, such as the total contract value) and the value is a bare number, that number is an integer count of the currency's smallest step, sent as text (e.g. 5000000 = 50,000.00), never with a fraction; a formatted amount ($50,000, USD 50k) and the value of any other field are read as written.
metadata object

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/intelligence/relationships

Find the other documents one document refers to

Scans one agreement's extracted fields for references to other contracts — by title, by date, by type-and-date, or by reference number — and returns each reference that resolved to another agreement in the same organization, with the match type and a confidence score, alongside the total number of references found. Only matches above 0.5 confidence are returned, and at most one per matched agreement (the highest-scoring one), so a reference that matched nothing is visible only in the totalReferencesFound count. Read-only: it follows references outward from the agreement you name and stores no relationship, so it is not a portfolio-wide relationship graph.

Parameters

NameInTypeDescription
agreement_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/intelligence/renewals-with-spend

Renewals with what was paid

Answers 'which vendors renew this quarter and what did we pay them?': the contracts the caller can open whose term ends or renews inside the window (default: this calendar quarter), soonest first, each with what was paid to the vendor in the last 12 months and over the term (from the connected finance system), its standing against the contract value and a renewal brief. Amounts are integer minor units in the row's currency. A row whose spend is not known (no finance system connected and caught up, no payment matched to the contract, or part of its money waiting on a paused or disconnected connection, flagged spendWaiting) carries no brief and says so in its sentence.

Parameters

NameInTypeDescription
from query string
to query string
limit query integer

Responses

StatusDescription
200OK
400Malformed request or invalid parameters for the operation, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters for the operation; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource or operation
404404 — NOT_FOUND: The requested resource (or a resource referenced by the operation) was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable
429429 — TOO_MANY_REQUESTS: Rate limit or quota exceeded for the operation
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error while processing the operation
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

See it on your contracts.

Book a demo

Trusted by teams at

  • 4M+ documents signed since 2014