Knowledge Base
Get all knowledge bases
GET /knowledge-bases HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
"data": [
{
"default_language": "text",
"id": "text",
"slug": "text",
"supported_languages": [
"text"
],
"title": "text"
}
],
"pagination": {
"cursor": "text",
"has_next_page": true
},
"request_id": "text"
}
Get a knowledge base by its ID
The ID of the knowledge base.
GET /knowledge-bases/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
"data": {
"default_language": "text",
"id": "text",
"slug": "text",
"supported_languages": [
"text"
],
"title": "text"
},
"request_id": "text"
}
List all collections in a knowledge base
The ID of the knowledge base
GET /knowledge-bases/{id}/collections HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
"data": [
{
"created_at": "text",
"description": "text",
"id": "text",
"parent_collection_id": "text",
"slug": "text",
"title": "text"
}
],
"request_id": "text"
}
This endpoint creates a new article in the specified knowledge base. If translations are provided, they will also be created and associated with the article. If the article is published, the translations will also be published.
The ID of the knowledge base the article is being added to.
The ID of the user attributed as the author of the article.
The HTML body of the article.
The id of the collection associated to the article
Whether the article should be published. Defaults to false.
Whether the article can only be accessible only via direct link. Defaults to false.
The slug of the article. Defaults to a slug based on the title.
The title of the article.
POST /knowledge-bases/{id}/articles HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 248
{
"author_user_id": "text",
"body_html": "text",
"collection_id": "text",
"is_published": true,
"is_unlisted": true,
"slug": "text",
"title": "text",
"translations": [
{
"body_html": "text",
"language": "text",
"title": "text"
}
],
"visibility_config": {
"visibility": "text"
}
}
{
"data": {
"current_published_content_html": "text",
"id": "text",
"identifier": "text",
"is_published": true,
"last_published_at": "text",
"slug": "text",
"title": "text",
"visibility_config": {
"visibility": "text"
}
},
"request_id": "text"
}
Update an existing article
The KnowledgeBaseID of the article to update.
The ID of the article to update.
The HTML body of the article.
The language code of the translation to update. If not provided, the default language (original article) will be updated.
Whether the changes to the article should be published. Defaults to false.
The title of the article.
PATCH /knowledge-bases/{id}/articles/{article_id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"body_html": "text",
"language": "text",
"publish_updated_body_html": true,
"title": "text"
}
{
"data": {
"current_published_content_html": "text",
"id": "text",
"identifier": "text",
"is_published": true,
"last_published_at": "text",
"slug": "text",
"title": "text",
"visibility_config": {
"visibility": "text"
}
},
"request_id": "text"
}
Create a new collection
The ID of the knowledge base the article is being added to.
Description of the collection.
The id of the collection associated to the article
The slug of the collection. Defaults to a slug based on the title.
The title of the collection.
POST /knowledge-bases/{id}/collections HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 81
{
"description": "text",
"parent_collection_id": "text",
"slug": "text",
"title": "text"
}
{
"data": {
"created_at": "text",
"description": "text",
"id": "text",
"parent_collection_id": "text",
"slug": "text",
"title": "text"
},
"request_id": "text"
}
Create a new route redirect
The ID of the knowledge base the route redirect is being added to.
The path to redirect from.
Language of the object to redirect to. If not specified, the default language of the knowledge base will be used.
The ID of the object to redirect to.
The type of the object to redirect to. This must be "article".
POST /knowledge-bases/{id}/route-redirects HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"from_path": "text",
"language": "text",
"object_id": "text",
"object_type": "text"
}
{
"data": {
"created_at": "text",
"from_path": "text",
"id": "text",
"language": "text",
"object_id": "text",
"object_type": "text"
},
"request_id": "text"
}
Last updated
Was this helpful?