Skip to content

Delete points ​

Delete one or more rows from a knowledge table by their default_id.

DELETE/api/user/knowledge-tables/{knowledgeTable}/points
Required scope: knowledge:write
Path parameters
integer
Request body (JSON)
curl -X DELETE "https://loopx-console.test/api/user/knowledge-tables/12/points" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"ids":["q-001","q-003"]}'
<?php

use GuzzleHttp\Client;

$client = new Client();
$response = $client->request('DELETE', 'https://loopx-console.test/api/user/knowledge-tables/12/points', [
    'headers' => [
        'Authorization' => 'Bearer $TOKEN',
        'Accept'        => 'application/json',
    ],
    'json' => [
        'ids' => [
            'q-001',
            'q-003'
        ]
    ]
]);

$data = json_decode($response->getBody(), true);
const res = await fetch('https://loopx-console.test/api/user/knowledge-tables/12/points', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer $TOKEN',
    Accept: 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ids": [
      "q-001",
      "q-003"
    ]
  })
});

const data = await res.json();

Example response

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

Request body ​

FieldTypeRequiredDescription
idsarrayyesArray of point default_id values to remove

Errors ​

CodeWhen
403Token missing knowledge:write scope
404Knowledge table not found
422ids empty