CRM — HubSpot/Salesforce deal context, schema discovery and lifecycle mappings.
Every path is on https://app.concord.app.
- POST
/api/v1/crm/dealLink a CRM deal to a document - DELETE
/api/v1/crm/dealUnlink a CRM deal from its document - GET
/api/v1/crm/deal-linksList document-to-CRM-deal links - POST
/api/v1/crm/lifecycle-mappingUpsert a CRM lifecycle stage mapping - DELETE
/api/v1/crm/lifecycle-mappingDelete a CRM lifecycle stage mapping - GET
/api/v1/crm/lifecycle-mappingsList CRM lifecycle stage mappings
POST/api/v1/crm/deal
Link a CRM deal to a document
Attaches an external CRM deal — a Salesforce opportunity or a HubSpot deal — to an agreement through a configured connector, carrying the deal's name, company and URL onto the agreement so the two records stay associated.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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
| Name | Type | Description |
|---|---|---|
agreement_idrequired | string | |
connector_idrequired | string | |
external_deal_idrequired | string | |
external_deal_name | string | |
external_company_name | string | |
external_deal_url | string (uri) |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: Requested resource does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
DELETE/api/v1/crm/deal
Unlink a CRM deal from its document
Removes one CRM deal link by its link id. The agreement and the external CRM record are both left untouched — only the association between them is deleted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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
| Name | Type | Description |
|---|---|---|
link_idrequired | string |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: Requested resource does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
GET/api/v1/crm/deal-links
List document-to-CRM-deal links
Lists the stored links between concord.app agreements and deals in a connected CRM, optionally narrowed to one agreement (by id or public id) or to one connector. Each row carries the external deal's id, name, company and URL, whether stage sync is enabled for it, when it last synced, and a summary of the linked agreement. The rows are concord.app's own; the connected CRM is not contacted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
agreement_id | query | string | |
connector_id | query | string |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: Requested resource does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
POST/api/v1/crm/lifecycle-mapping
Upsert a CRM lifecycle stage mapping
Creates or updates one row in the organization's stage-translation table: which CRM deal stage an agreement lifecycle stage (optionally narrowed to one agreement status) should be pushed to. The row is matched on connector, agreement stage and agreement status, so re-sending the values crm.listLifecycleMappings returned overwrites that same row. Supply externalStageId — the CRM's own stage id, from crm.listPipelines — or crm.syncDealStage has nothing to write into the CRM. This stores configuration only; the connected CRM is not contacted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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
| Name | Type | Description |
|---|---|---|
connector_idrequired | string | |
agreement_stagerequired | one of "draft", "review", "signing", "signed" | |
agreement_status | string | |
external_stage_namerequired | string | |
external_stage_id | string | |
sync_directionrequired | one of "push", "pull", "bidirectional" |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: Requested resource does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
DELETE/api/v1/crm/lifecycle-mapping
Delete a CRM lifecycle stage mapping
Permanently deletes one mapping between an agreement lifecycle stage and a CRM deal stage. The mapping row is removed outright — there is no restore — and the connected CRM is not contacted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
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
| Name | Type | Description |
|---|---|---|
idrequired | string |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: The referenced lifecycle stage mapping does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |
GET/api/v1/crm/lifecycle-mappings
List CRM lifecycle stage mappings
Lists one connector's stage-translation rows: which CRM deal stage each agreement lifecycle stage — optionally narrowed to a single agreement status — is pushed to, plus each row's sync direction and the CRM stage id crm.syncDealStage writes. These rows are concord.app configuration; the connected CRM is not contacted.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
connector_idrequired | query | string |
Responses
| Status | Description |
|---|---|
200 | OK |
400 | Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation |
401 | 401 — UNAUTHORIZED: Missing or invalid authentication credentials |
403 | 403 — FORBIDDEN: Authenticated but not authorized for this resource |
404 | 404 — NOT_FOUND: Requested resource does not exist |
405 | 405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource |
406 | 406 — NOT_ACCEPTABLE: Requested representation is not acceptable |
408 | 408 — TIMEOUT: Request timed out |
409 | 409 — CONFLICT: Resource state conflict — concurrent modification or duplicate |
412 | 412 — PRECONDITION_FAILED: Resource state does not allow the requested operation |
413 | 413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size |
415 | 415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported |
422 | 422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch |
429 | 429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying |
499 | 499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished |
500 | 500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried |
501 | 501 — NOT_IMPLEMENTED: The requested operation is not implemented |
502 | 502 — BAD_GATEWAY: Invalid response from an upstream dependency |
503 | 503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After |
504 | 504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency |