Link or unlink one conversation record
Configurable CRM record contract. Record references contain both typeId and recordId. Workspace scope comes from authentication. Decimal values are strings. Writes require their documented revision and idempotency preconditions; pending results refer to a durable operation.
Requires: read and edit access to inbox messages, and edit access to the record's list.
Authorization
apiKeyAuth x-api-key<token>
API key authentication. Create an API key in your user profile and include it in the x-api-key header.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://customermates.com/api/v1/messaging/record-links/mutate" \ -H "Content-Type: application/json" \ -d '{ "action": "link", "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e", "ref": { "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7", "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f" }, "expectedRevision": 9007199254740991, "idempotencyKey": "0c14c6a6-6f50-4d1e-b0c4-b46ff43ba6a1" }'{
"ref": {
"typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
"recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"
},
"linked": true,
"schemaRevision": 9007199254740991
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}Empty