Skip to content

Try “workflows”, “templates”, “SOQL” or “create a record”.

Knowledge base

Collections and items your AI answers from.

List knowledge collections

GET/knowledge/collections
Scope knowledge_base:viewRead-only

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/collections" \  -H "Authorization: Bearer $KLERC_TOKEN"

Create a knowledge collection

POST/knowledge/collections
Scope knowledge_base:createWrites data

Request body

FieldType
namerequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/collections" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"name":"…"}'

Get a knowledge collection

GET/knowledge/collections/{cid}
Scope knowledge_base:viewRead-only

Path parameters

NameType
cidrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/collections/{cid}" \  -H "Authorization: Bearer $KLERC_TOKEN"

Update a knowledge collection

PATCH/knowledge/collections/{cid}
Scope knowledge_base:manageWrites data

Path parameters

NameType
cidrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/knowledge/collections/{cid}" \  -H "Authorization: Bearer $KLERC_TOKEN"

Delete a knowledge collection

DELETE/knowledge/collections/{cid}
Scope knowledge_base:manageWrites data

Path parameters

NameType
cidrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/knowledge/collections/{cid}" \  -H "Authorization: Bearer $KLERC_TOKEN"

List knowledge items

GET/knowledge/items
Scope knowledge_base:viewRead-only

Query parameters

NameType
limitnumber
cursorstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/items?limit=25" \  -H "Authorization: Bearer $KLERC_TOKEN"

Create a knowledge item

POST/knowledge/items
Scope knowledge_base:createWrites data

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items" \  -H "Authorization: Bearer $KLERC_TOKEN"

Get a knowledge item

GET/knowledge/items/{id}
Scope knowledge_base:viewRead-only

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/items/{id}" \  -H "Authorization: Bearer $KLERC_TOKEN"

Update a knowledge item

PATCH/knowledge/items/{id}
Scope knowledge_base:manageWrites data

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X PATCH "https://api.klerc.co/api/v1/knowledge/items/{id}" \  -H "Authorization: Bearer $KLERC_TOKEN"

Delete a knowledge item

DELETE/knowledge/items/{id}
Scope knowledge_base:manageWrites data

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/knowledge/items/{id}" \  -H "Authorization: Bearer $KLERC_TOKEN"

Restore an item from the trash

POST/knowledge/items/{id}/restore
Scope knowledge_base:manageWrites data

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/restore" \  -H "Authorization: Bearer $KLERC_TOKEN"

Star an item

POST/knowledge/items/{id}/star
Scope knowledge_base:viewWrites data

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/star" \  -H "Authorization: Bearer $KLERC_TOKEN"

Remove an item's star

DELETE/knowledge/items/{id}/star
Scope knowledge_base:viewWrites data

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/knowledge/items/{id}/star" \  -H "Authorization: Bearer $KLERC_TOKEN"

Move, trash, restore or permanently delete several items at once

POST/knowledge/items/bulk
Scope knowledge_base:manageWrites data

Request body

FieldType
oprequired"move" | "trash" | "restore" | "purge"
idsrequiredarray of string
collectionIdstring | null

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/bulk" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"op":"move","ids":["…"],"collectionId":"…"}'

Create a new document or spreadsheet

POST/knowledge/items/native
Scope knowledge_base:createWrites data

Request body

FieldType
kindrequired"sheet" | "doc"
namestring
descriptionstring
collectionIdstring | null

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/native" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"kind":"sheet","name":"…","description":"…","collectionId":"…"}'

Make a copy of a file

POST/knowledge/items/{id}/duplicate
Scope knowledge_base:createWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
namestring
collectionIdstring | null

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/duplicate" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"name":"…","collectionId":"…"}'

Download a file as xlsx, csv, docx, json, txt or the original upload

GET/knowledge/items/{id}/export
Scope knowledge_base:exportRead-only

Path parameters

NameType
idrequiredstring

Query parameters

NameType
format"xlsx" | "csv" | "docx" | "json" | "txt" | "md" | "original"

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/items/{id}/export" \  -H "Authorization: Bearer $KLERC_TOKEN"

List a file's saved versions

GET/knowledge/items/{id}/versions
Scope knowledge_base:viewRead-only

Path parameters

NameType
idrequiredstring

Query parameters

NameType
limitnumber
beforenumber

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/items/{id}/versions?limit=25" \  -H "Authorization: Bearer $KLERC_TOKEN"

Save a named version of a file

POST/knowledge/items/{id}/versions
Scope knowledge_base:manageWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
labelstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/versions" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"label":"…"}'

Restore a file to an earlier version

POST/knowledge/items/{id}/versions/{vid}/restore
Scope knowledge_base:manageWrites data

Path parameters

NameType
idrequiredstring
vidrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/versions/{vid}/restore" \  -H "Authorization: Bearer $KLERC_TOKEN"

Find people, teams and roles a file can be shared with

GET/knowledge/share-subjects

Call this first to turn a name like "the sales team" into the subjectId that knowledge.shares.set needs.

Scope knowledge_base:shareRead-only

Query parameters

NameType
qstring
type"user" | "team" | "role"

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/share-subjects" \  -H "Authorization: Bearer $KLERC_TOKEN"

List who a file is shared with

GET/knowledge/items/{id}/shares
Scope knowledge_base:viewRead-only

Path parameters

NameType
idrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/items/{id}/shares" \  -H "Authorization: Bearer $KLERC_TOKEN"

Share a file with a person, team or role

POST/knowledge/items/{id}/shares

Resolve the subjectId with knowledge.shares.subjects first. Only a file's owner can change who has access.

Scope knowledge_base:shareWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
subjectTyperequired"user" | "team" | "role"
subjectIdrequiredstring
rolerequired"viewer" | "commenter" | "editor"
notifyboolean
messagestring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/shares" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"subjectType":"user","subjectId":"…","role":"viewer","notify":false,"message":"…"}'

Stop sharing a file with someone

DELETE/knowledge/items/{id}/shares
Scope knowledge_base:shareWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
subjectTyperequired"user" | "team" | "role"
subjectIdrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/knowledge/items/{id}/shares" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"subjectType":"user","subjectId":"…"}'

Set what everyone in the workspace can do with a file

PUT/knowledge/items/{id}/org-access
Scope knowledge_base:shareWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
orgAccessrequired"none" | "viewer" | "commenter" | "editor"

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X PUT "https://api.klerc.co/api/v1/knowledge/items/{id}/org-access" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"orgAccess":"none"}'

Choose whether a file follows its folder's permissions

PUT/knowledge/items/{id}/inherit
Scope knowledge_base:shareWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
inheritrequiredboolean

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X PUT "https://api.klerc.co/api/v1/knowledge/items/{id}/inherit" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"inherit":false}'

Transfer ownership of a file

POST/knowledge/items/{id}/owner
Scope knowledge_base:shareWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
userIdrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/owner" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"userId":"…"}'

List who a folder is shared with

GET/knowledge/collections/{cid}/shares
Scope knowledge_base:viewRead-only

Path parameters

NameType
cidrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/collections/{cid}/shares" \  -H "Authorization: Bearer $KLERC_TOKEN"

Share a folder — everything inside it follows

POST/knowledge/collections/{cid}/shares
Scope knowledge_base:shareWrites data

Path parameters

NameType
cidrequiredstring

Request body

FieldType
subjectTyperequired"user" | "team" | "role"
subjectIdrequiredstring
rolerequired"viewer" | "commenter" | "editor"
notifyboolean

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/collections/{cid}/shares" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"subjectType":"user","subjectId":"…","role":"viewer","notify":false}'

Stop sharing a folder with someone

DELETE/knowledge/collections/{cid}/shares
Scope knowledge_base:shareWrites data

Path parameters

NameType
cidrequiredstring

Request body

FieldType
subjectTyperequired"user" | "team" | "role"
subjectIdrequiredstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X DELETE "https://api.klerc.co/api/v1/knowledge/collections/{cid}/shares" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"subjectType":"user","subjectId":"…"}'

Set what everyone in the workspace can do with a folder

PUT/knowledge/collections/{cid}/org-access
Scope knowledge_base:shareWrites data

Path parameters

NameType
cidrequiredstring

Request body

FieldType
orgAccessrequired"none" | "viewer" | "commenter" | "editor"

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X PUT "https://api.klerc.co/api/v1/knowledge/collections/{cid}/org-access" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"orgAccess":"none"}'

Tell the people mentioned in a comment

POST/knowledge/items/{id}/mentions
Scope knowledge_base:viewWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
commentIdnumber
userIdsrequiredarray of string
textstring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/mentions" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"commentId":0,"userIds":["…"],"text":"…"}'

List document and spreadsheet templates

GET/knowledge/templates
Scope knowledge_base:viewRead-only

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X GET "https://api.klerc.co/api/v1/knowledge/templates" \  -H "Authorization: Bearer $KLERC_TOKEN"

Save a copy of a file as a reusable template

POST/knowledge/items/{id}/template
Scope knowledge_base:createWrites data

Path parameters

NameType
idrequiredstring

Request body

FieldType
namestring
categorystring

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/{id}/template" \  -H "Authorization: Bearer $KLERC_TOKEN" \  -H "Content-Type: application/json" \  -d '{"name":"…","category":"…"}'

Upload a file to the knowledge base

POST/knowledge/items/upload
Scope knowledge_base:createWrites data

Responses

  • 200OK
  • 201Created
  • 401Authentication failed
  • 403Insufficient scope / feature disabled
  • 404Not found
curl
curl -X POST "https://api.klerc.co/api/v1/knowledge/items/upload" \  -H "Authorization: Bearer $KLERC_TOKEN"