Pylon
Knowledge BaseWebsiteChangelogBook a DemoLogin
  • Getting Started
    • Introduction
    • Quick Start
    • Slack Setup
    • Channel Configuration
    • User Guide
  • Support Workflows
    • Omnichannel Support
    • Issues
      • Views
      • Statuses
      • Message Editor
      • Copilot
      • Sidebar
      • Internal Threads
      • Proactive Issues
      • Translation
      • Bulk actions
      • Issue Groups
    • SLAs
    • Support Hours
    • CSAT
    • Ticket Forms
    • Assignment Rules
      • User Status
    • Email
  • Platform
    • Custom Fields
    • Required and Conditional Fields
    • Tags
    • Teams
    • Triggers
      • Logs & History
    • Macros
    • Command Search
    • Roles & User Management
    • Training Data
    • Ask AI
  • AI Agents
    • Overview
    • Build
      • Resources
    • Test
  • Knowledge Base
    • Overview
    • Articles & Collections
      • Editor
      • Copilot
      • Templates
      • Collaboration
    • Knowledge Gaps
    • Styling & Customization
    • Custom Authentication
    • Search
    • Translation
  • Customer Portal
    • Overview
    • Styling & Customization
    • Access Control
    • Portal Experience
    • Custom Authentication
  • Chat Widget
    • Overview
    • Styling
    • Functionality
    • Chat Experience
    • Chat Setup
    • Identity Verification
    • JavaScript API
  • Account Management
    • Accounts
    • Views
    • Notebooks
      • Blocks
    • Highlights
    • Fields
    • Copilot
    • Activities
      • Custom Activities
    • Sidebar
  • Reporting & Analytics
    • Analytics
    • Default Dashboards
    • Custom Dashboards
  • Broadcasts
    • Overview
    • Create a Broadcast
    • Analytics
  • Integrations
    • CRM
      • Salesforce
      • Hubspot
      • Attio
      • Pipedrive
    • Ticketing
      • Linear
      • GitHub Issues
      • Asana
      • Jira
    • Alerting
      • PagerDuty
      • Opsgenie
    • Chat
      • Slack
        • Internal Threads
        • Collect Data
        • Support Ticket Flow
        • Welcome Message
        • Bookmarks
        • Onboard Employees
        • Left Company
        • Slack Community
      • Microsoft Teams
      • Discord
    • Incident Management
      • incident.io
    • Call Recording
      • Gong
      • Fathom
      • Grain
      • Fireflies
  • Data Warehouse
    • Snowflake
    • BigQuery
  • Developer
    • API
      • Authentication
      • Errors
      • API reference
        • Attachments
        • Accounts
          • Activities
          • Highlights
        • Contacts
        • Custom Fields
        • Issues
        • Knowledge Base
        • Me
        • Messages
        • Tags
        • Teams
        • Ticket Forms
        • User roles
        • Users
      • External IDs
    • Custom Apps
    • Embedded Iframes
    • Webhooks
Powered by GitBook
On this page

Was this helpful?

  1. Developer
  2. API
  3. API reference

Knowledge Base

PreviousIssuesNextMe

Last updated 20 days ago

Was this helpful?

get

Get all knowledge bases

Authorizations
Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
get
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

Get a knowledge base by its ID

Authorizations
Path parameters
idstringRequired

The ID of the knowledge base.

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
get
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"
}
get

List all collections in a knowledge base

Authorizations
Path parameters
idstringRequired

The ID of the knowledge base

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
get
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"
}
patch

Update an existing article

Authorizations
Path parameters
idstringRequired

The KnowledgeBaseID of the article to update.

article_idstringRequired

The ID of the article to update.

Body
body_htmlstringOptional

The HTML body of the article.

languagestringOptional

The language code of the translation to update. If not provided, the default language (original article) will be updated.

publish_updated_body_htmlbooleanOptional

Whether the changes to the article should be published. Defaults to false.

titlestringOptional

The title of the article.

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
patch
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"
}
post

Create a new collection

Authorizations
Path parameters
idstringRequired

The ID of the knowledge base the article is being added to.

Body
descriptionstringOptional

Description of the collection.

parent_collection_idstringOptional

The id of the collection associated to the article

slugstringOptional

The slug of the collection. Defaults to a slug based on the title.

titlestringRequired

The title of the collection.

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
post
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"
}
post

Create a new route redirect

Authorizations
Path parameters
idstringRequired

The ID of the knowledge base the route redirect is being added to.

Body
from_pathstringRequired

The path to redirect from.

languagestringOptional

Language of the object to redirect to. If not specified, the default language of the knowledge base will be used.

object_idstringRequired

The ID of the object to redirect to.

object_typestringRequired

The type of the object to redirect to. This must be "article".

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
post
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"
}
  • GET/knowledge-bases
  • GET/knowledge-bases/{id}
  • GET/knowledge-bases/{id}/collections
  • POSTCreate a new article
  • PATCH/knowledge-bases/{id}/articles/{article_id}
  • POST/knowledge-bases/{id}/collections
  • POST/knowledge-bases/{id}/route-redirects

Create a new article

post

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.

Authorizations
Path parameters
idstringRequired

The ID of the knowledge base the article is being added to.

Body
author_user_idstringRequired

The ID of the user attributed as the author of the article.

body_htmlstringRequired

The HTML body of the article.

collection_idstringOptional

The id of the collection associated to the article

is_publishedbooleanOptional

Whether the article should be published. Defaults to false.

is_unlistedbooleanOptional

Whether the article can only be accessible only via direct link. Defaults to false.

slugstringOptional

The slug of the article. Defaults to a slug based on the title.

titlestringRequired

The title of the article.

Responses
200Success
application/json
400Error
application/json
404Error
application/json
500Error
application/json
post
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"
}