Meta Pixel
RubikChat
RubikChat
Get Started Free

No credit card required · 14-day free trial

Batch

Create, read or archive many records of one object type in a single request. Each item is handled on its own: when some items fail, the others still succeed.

Create records

Creates several records at once.
POST/objects/{objectType}/batch/create

Path Parameters

NameTypeRequiredDescription
objectTypestringrequiredObject type id (0-1 contacts, 0-2 companies, 0-3 deals, 2-… custom objects) or its name, e.g. contacts.

Request Body

NameTypeRequiredDescription
inputsarrayrequiredThe records to create: [{ properties, associations? }], in the same format as Create a record.
Example Request (cURL) · bash
curl --location --request POST 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/contacts/batch/create' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputs": [
    {
      "properties": {
        "firstname": "Ali",
        "lastname": "Khan",
        "email": "[email protected]"
      }
    },
    {
      "properties": {
        "firstname": "Sara",
        "lastname": "Ahmed",
        "email": "[email protected]"
      }
    }
  ]
}'

Status: 201 Created

Example Response · json
{
  "status": "COMPLETE",
  "results": [
    {
      "id": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
      "properties": {
        "firstname": "Ali",
        "lastname": "Khan",
        "email": "[email protected]",
        "phone": "+923001234567"
      },
      "createdAt": "2026-11-12T10:00:00.000Z",
      "updatedAt": "2026-11-12T10:00:00.000Z",
      "archived": false
    },
    {
      "id": "b82e4d10-95c7-4f3a-8e6b-2c9d71f0a5e8",
      "properties": {
        "firstname": "Sara",
        "lastname": "Ahmed",
        "email": "[email protected]"
      },
      "createdAt": "2026-11-12T10:05:00.000Z",
      "updatedAt": "2026-11-12T10:05:00.000Z",
      "archived": false
    }
  ],
  "startedAt": "2026-11-12T10:00:00Z",
  "completedAt": "2026-11-12T10:00:01Z"
}

Read records

Reads several records by id.
POST/objects/{objectType}/batch/read

Path Parameters

NameTypeRequiredDescription
objectTypestringrequiredObject type id (0-1 contacts, 0-2 companies, 0-3 deals, 2-… custom objects) or its name, e.g. contacts.

Request Body

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

Status: 200 OK

Example Response · json
{
  "status": "COMPLETE",
  "results": [
    {
      "id": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
      "properties": {
        "firstname": "Ali",
        "lastname": "Khan",
        "email": "[email protected]",
        "phone": "+923001234567"
      },
      "createdAt": "2026-11-12T10:00:00.000Z",
      "updatedAt": "2026-11-12T10:00:00.000Z",
      "archived": false
    },
    {
      "id": "b82e4d10-95c7-4f3a-8e6b-2c9d71f0a5e8",
      "properties": {
        "firstname": "Sara",
        "lastname": "Ahmed",
        "email": "[email protected]"
      },
      "createdAt": "2026-11-12T10:05:00.000Z",
      "updatedAt": "2026-11-12T10:05:00.000Z",
      "archived": false
    }
  ],
  "startedAt": "2026-11-12T10:00:00Z",
  "completedAt": "2026-11-12T10:00:01Z"
}

Archive records

Deletes (archives) several records by id. Ids that do not exist are skipped.
POST/objects/{objectType}/batch/archive

Path Parameters

NameTypeRequiredDescription
objectTypestringrequiredObject type id (0-1 contacts, 0-2 companies, 0-3 deals, 2-… custom objects) or its name, e.g. contacts.

Request Body

NameTypeRequiredDescription
inputsarrayrequiredThe records to delete: [{ id }].
Example Request (cURL) · bash
curl --location --request POST 'https://api-proxy-v1.rubikchat.com/api/crm/v3/objects/contacts/batch/archive' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'X-Organization-Slug: your-organization-slug' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputs": [
    {
      "id": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34"
    },
    {
      "id": "b82e4d10-95c7-4f3a-8e6b-2c9d71f0a5e8"
    }
  ]
}'

Status: 204 No Content

The reply has no body.

Partial errors (207)

When some items of a batch create or batch read fail, the reply status is 207 Multi-Status. results holds the items that worked, and errors the ones that did not, with their position in inputs (index).

Example Response (207) · json
{
  "status": "COMPLETE",
  "results": [
    {
      "id": "6f1c2a9e-3b4d-4c8a-9f21-7d5e0b8a1c34",
      "properties": {
        "firstname": "Ali",
        "lastname": "Khan",
        "email": "[email protected]",
        "phone": "+923001234567"
      },
      "createdAt": "2026-11-12T10:00:00.000Z",
      "updatedAt": "2026-11-12T10:00:00.000Z",
      "archived": false
    }
  ],
  "startedAt": "2026-11-12T10:00:00Z",
  "completedAt": "2026-11-12T10:00:01Z",
  "numErrors": 1,
  "errors": [
    {
      "index": 1,
      "id": "b82e4d10-95c7-4f3a-8e6b-2c9d71f0a5e8",
      "message": "Not found"
    }
  ]
}

Tip

Check numErrors (or the 207 status) after every batch call, and retry only the failed items.