Skip to content

Upsert points ​

Create or update rows in bulk. Rows are matched by default_id — an existing row with the same default_id is updated in place; otherwise a new row is created.

PUT/api/user/knowledge-tables/{knowledgeTable}/points
Required scope: knowledge:write
Path parameters
integer
Request body (JSON)
curl -X PUT "https://loopx-console.test/api/user/knowledge-tables/12/points" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"points":[{"default_id":"q-001","question":"How do I reset my password?","answer":"Go to Settings → Security → Reset password. Check your email for the reset link.","category":"account"},{"default_id":"q-003","question":"What payment methods do you accept?","answer":"Visa, MasterCard, AMEX, and bank transfer (Enterprise only).","category":"billing"}]}'
<?php

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('PUT', 'https://loopx-console.test/api/user/knowledge-tables/12/points', [
    'headers' => [
        'Authorization' => 'Bearer $TOKEN',
        'Accept'        => 'application/json',
    ],
    'json' => [
        'points' => [
            [
                'default_id' => 'q-001',
                'question' => 'How do I reset my password?',
                'answer' => 'Go to Settings → Security → Reset password. Check your email for the reset link.',
                'category' => 'account'
            ],
            [
                'default_id' => 'q-003',
                'question' => 'What payment methods do you accept?',
                'answer' => 'Visa, MasterCard, AMEX, and bank transfer (Enterprise only).',
                'category' => 'billing'
            ]
        ]
    ]
]);

$data = json_decode($response->getBody(), true);
const res = await fetch('https://loopx-console.test/api/user/knowledge-tables/12/points', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer $TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "points": [
      {
        "default_id": "q-001",
        "question": "How do I reset my password?",
        "answer": "Go to Settings → Security → Reset password. Check your email for the reset link.",
        "category": "account"
      },
      {
        "default_id": "q-003",
        "question": "What payment methods do you accept?",
        "answer": "Visa, MasterCard, AMEX, and bank transfer (Enterprise only).",
        "category": "billing"
      }
    ]
  })
});

const data = await res.json();

Example response

{
  "status": true,
  "code": 200,
  "message": "Points upserted successfully.",
  "data": {
    "upserted": 2
  }
}

Request body ​

FieldTypeRequiredDescription
pointsarrayyesAt least one point
points[].default_idstring | integeryesStable id you assign — used to match existing rows
points[].{column}anynoOne entry per column defined on the table

Call List columns first to discover the columns supported by this table.

Errors ​

CodeWhen
403Token missing knowledge:write scope
404Knowledge table not found in your workspace
422points is empty, or a point is missing default_id