Meta Pixel
RubikChat
RubikChat
Get Started Free

No credit card required · 14-day free trial

Associations

Associations link records to each other: a contact to its company, a deal to its contacts, a custom object to a contact. A link can carry a label, such as "Primary" or "Billing contact".

  • Every link has an association type, identified by an associationTypeId. The types available between two object types are listed by the endpoints below.
  • The unlabelled (default) type is the usual link. Labelled types add meaning to the link.
  • Links can only be made between records of the same organization.
  • When you link A to B with the default type, the link from B back to A is created for you.
  • In the association endpoints, write object types as ids (0-1, 0-2, 2-100001).

Tip

You can also link a record when you create it, with associations in the body of Create a record.

Association types

Lists the association types from one object type to another. Use a typeId as associationTypeId when you link records.
GET/associations/{fromObjectType}/{toObjectType}/types

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
Example Request (cURL) · bash
curl --location --request GET 'https://api-proxy-v1.rubikchat.com/api/crm/v3/associations/0-1/0-2/types' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'

Status: 200 OK

Example Response · json
{
  "data": [
    {
      "typeId": 1,
      "category": "SYSTEM_DEFINED",
      "label": null
    },
    {
      "typeId": 10045,
      "category": "USER_DEFINED",
      "label": "Billing contact"
    }
  ]
}

Association labels

The same list in the labels format. A label of null is the default, unlabelled type.
GET/associations/{fromObjectType}/{toObjectType}/labels

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
Example Request (cURL) · bash
curl --location --request GET 'https://api-proxy-v1.rubikchat.com/api/crm/v3/associations/0-1/0-2/labels' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'

Status: 200 OK

Example Response · json
{
  "results": [
    {
      "category": "SYSTEM_DEFINED",
      "typeId": 1,
      "label": null
    },
    {
      "category": "USER_DEFINED",
      "typeId": 10045,
      "label": "Billing contact"
    }
  ]
}
Links two records with the default (unlabelled) association type. No body is needed.
PUT/objects/{fromObjectType}/{recordId}/associations/default/{toObjectType}/{toRecordId}

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
recordIdstringrequiredId of the first record.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
toRecordIdstringrequiredId of the other record.
Example Request (cURL) · bash
curl --location --request PUT 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/0-1/6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34/associations/default/0-2/0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'

Status: 201 Created

Example Response · json
{
  "fromTableId": "0-1",
  "fromRowId": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
  "toTableId": "0-2",
  "toRowId": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d",
  "labels": []
}
Links two records with one or more association types. The body is an array, one item per type. Links that already exist are kept.
PUT/objects/{fromObjectType}/{recordId}/associations/{toObjectType}/{toRecordId}

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
recordIdstringrequiredId of the first record.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
toRecordIdstringrequiredId of the other record.

Request Body (array)

NameTypeRequiredDescription
[].associationCategorystringrequiredSYSTEM_DEFINED or USER_DEFINED, as returned by Association types.
[].associationTypeIdintegerrequiredThe association type to add.
Example Request (cURL) · bash
curl --location --request PUT 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/0-1/6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34/associations/0-2/0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "associationCategory": "USER_DEFINED",
    "associationTypeId": 10045
  }
]'

Status: 201 Created

Example Response · json
{
  "fromTableId": "0-1",
  "fromRowId": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
  "toTableId": "0-2",
  "toRowId": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d",
  "labels": [
    "Billing contact"
  ]
}
Links two records with the association type given in the path. No body is needed. The reply carries the id of the new link.
PUT/objects/{fromObjectType}/{recordId}/associations/{toObjectType}/{toRecordId}/{associationTypeId}

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
recordIdstringrequiredId of the first record.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
toRecordIdstringrequiredId of the other record.
associationTypeIdintegerrequiredThe association type to use (from Association types).
Example Request (cURL) · bash
curl --location --request PUT 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/0-1/6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34/associations/0-2/0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d/1' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'

Status: 201 Created

Example Response · json
{
  "id": "8812",
  "properties": [],
  "createdAt": "2026-11-12T10:00:00.000Z",
  "updatedAt": "2026-11-12T10:00:00.000Z",
  "archived": false
}
Lists the records of one object type that are linked to a record, with the types of each link.
GET/objects/{fromObjectType}/{recordId}/associations/{toObjectType}

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
recordIdstringrequiredId of the first record.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
Example Request (cURL) · bash
curl --location --request GET 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/0-1/6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34/associations/0-2' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'

Status: 200 OK

Example Response · json
{
  "results": [
    {
      "toObjectId": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d",
      "toObjectTypeId": "0-2",
      "associationTypes": [
        {
          "category": "SYSTEM_DEFINED",
          "typeId": 1,
          "label": null
        },
        {
          "category": "USER_DEFINED",
          "typeId": 10045,
          "label": "Billing contact"
        }
      ]
    }
  ]
}
Removes all links between two records, whatever their type or label.
DELETE/objects/{fromObjectType}/{recordId}/associations/{toObjectType}/{toRecordId}

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
recordIdstringrequiredId of the first record.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.
toRecordIdstringrequiredId of the other record.
Example Request (cURL) · bash
curl --location --request DELETE 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/0-1/6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34/associations/0-2/0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Accept: application/json'

Status: 204 No Content

The reply has no body.

Link many records

Links many pairs of records with the default (unlabelled) association type.
POST/associations/{fromObjectType}/{toObjectType}/batch/associate/default

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.

Request Body

NameTypeRequiredDescription
inputsarrayrequiredThe pairs to link: [{ from: { id }, to: { id } }].
Example Request (cURL) · bash
curl --location --request POST 'https://api-proxy-v1.rubikchat.com/api/crm/v3/associations/0-1/0-2/batch/associate/default' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputs": [
    {
      "from": {
        "id": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34"
      },
      "to": {
        "id": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d"
      }
    },
    {
      "from": {
        "id": "b82e4d10-95c7-4f3a-8e6b-2c9d71f0a5e8"
      },
      "to": {
        "id": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d"
      }
    }
  ]
}'

Status: 200 OK

Example Response · json
{
  "status": "COMPLETE",
  "results": [
    {
      "fromObjectTypeId": "0-1",
      "fromObjectId": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
      "toObjectTypeId": "0-2",
      "toObjectId": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d",
      "labels": []
    },
    {
      "fromObjectTypeId": "0-1",
      "fromObjectId": "b82e4d10-95c7-4f3a-8e6b-2c9d71f0a5e8",
      "toObjectTypeId": "0-2",
      "toObjectId": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d",
      "labels": []
    }
  ],
  "startedAt": "2026-11-12T10:00:00Z",
  "completedAt": "2026-11-12T10:00:01Z"
}

Link many records with labels

Links many pairs of records, each with the association types you give.
POST/associations/{fromObjectType}/{toObjectType}/batch/create

Path Parameters

NameTypeRequiredDescription
fromObjectTypestringrequiredObject type id of the first record, e.g. 0-1.
toObjectTypestringrequiredObject type id of the other record, e.g. 0-2.

Request Body

NameTypeRequiredDescription
inputsarrayrequiredThe links to create: [{ from: { id }, to: { id }, types: [{ associationCategory, associationTypeId }] }].
Example Request (cURL) · bash
curl --location --request POST 'https://api-proxy-v1.rubikchat.com/api/crm/v3/associations/0-1/0-2/batch/create' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputs": [
    {
      "from": {
        "id": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34"
      },
      "to": {
        "id": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d"
      },
      "types": [
        {
          "associationCategory": "USER_DEFINED",
          "associationTypeId": 10045
        }
      ]
    }
  ]
}'

Status: 200 OK

Example Response · json
{
  "status": "COMPLETE",
  "results": [
    {
      "fromObjectTypeId": "0-1",
      "fromObjectId": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
      "toObjectTypeId": "0-2",
      "toObjectId": "0c5a7e3b-1f2d-4b6c-a8e9-3d4f5a6b7c8d",
      "labels": [
        "Billing contact"
      ]
    }
  ],
  "startedAt": "2026-11-12T10:00:00Z",
  "completedAt": "2026-11-12T10:00:01Z"
}