For the complete documentation index, see llms.txt. This page is also available as Markdown.

Knowledge Base

Get all knowledge bases

get

Returns all knowledge bases for the organization.

Rate limit: 60 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/knowledge-bases
GET /knowledge-bases HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
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

get

Returns a single knowledge base by ID.

Rate limit: 60 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the knowledge base.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/knowledge-bases/{id}
GET /knowledge-bases/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "default_language": "text",
    "id": "text",
    "slug": "text",
    "supported_languages": [
      "text"
    ],
    "title": "text"
  },
  "request_id": "text"
}

Get all collections in a knowledge base

get

Returns all collections for the specified knowledge base.

Rate limit: 20 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the knowledge base

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/knowledge-bases/{id}/collections
GET /knowledge-bases/{id}/collections HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "created_at": "text",
      "description": "text",
      "icon": "text",
      "id": "text",
      "parent_collection_id": "text",
      "slug": "text",
      "title": "text",
      "visibility_config": {
        "ai_agent_access": "inherit",
        "allowed_agent_ids": [
          "text"
        ],
        "visibility": "public"
      }
    }
  ],
  "request_id": "text"
}

Create a collection

post

Creates a new collection within a knowledge base.

Rate limit: 10 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

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 parent collection.

slugstringOptional

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

titlestringRequired

The title of the collection.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

post/knowledge-bases/{id}/collections
POST /knowledge-bases/{id}/collections HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 182

{
  "description": "text",
  "parent_collection_id": "text",
  "slug": "text",
  "title": "text",
  "visibility_config": {
    "ai_agent_access": "inherit",
    "allowed_agent_ids": [
      "text"
    ],
    "visibility": "public"
  }
}
{
  "data": {
    "created_at": "text",
    "description": "text",
    "icon": "text",
    "id": "text",
    "parent_collection_id": "text",
    "slug": "text",
    "title": "text",
    "visibility_config": {
      "ai_agent_access": "inherit",
      "allowed_agent_ids": [
        "text"
      ],
      "visibility": "public"
    }
  },
  "request_id": "text"
}

Update a collection

patch

Updates an existing collection. Only provided fields are modified.

Rate limit: 10 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the knowledge base that the collection belongs to.

collection_idstringRequired

The ID of the collection to update.

Body
descriptionstringOptional

The description of the collection.

slugstringOptional

The slug of the collection.

titlestringOptional

The title of the collection.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

patch/knowledge-bases/{id}/collections/{collection_id}
PATCH /knowledge-bases/{id}/collections/{collection_id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 152

{
  "description": "text",
  "slug": "text",
  "title": "text",
  "visibility_config": {
    "ai_agent_access": "inherit",
    "allowed_agent_ids": [
      "text"
    ],
    "visibility": "public"
  }
}
{
  "data": {
    "created_at": "text",
    "description": "text",
    "icon": "text",
    "id": "text",
    "parent_collection_id": "text",
    "slug": "text",
    "title": "text",
    "visibility_config": {
      "ai_agent_access": "inherit",
      "allowed_agent_ids": [
        "text"
      ],
      "visibility": "public"
    }
  },
  "request_id": "text"
}

Delete a collection

delete

Permanently deletes a collection and all articles within it from the knowledge base. Nested collections and their articles are also deleted.

Rate limit: 10 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the knowledge base that the collection belongs to.

collection_idstringRequired

The ID of the collection to delete.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

delete/knowledge-bases/{id}/collections/{collection_id}
DELETE /knowledge-bases/{id}/collections/{collection_id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "request_id": "text"
}

Get all articles in a knowledge base

get

Returns a paginated list of articles for the specified knowledge base.

Rate limit: 20 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the knowledge base the articles are being fetched from.

Query parameters
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Optional

The number of articles to fetch. Defaults to 100. Must be greater than 0 and less than 1000.

languagestringOptional

The language code to fetch articles in. If not provided, returns the default language.

mediastring · enumOptional

Controls whether embedded media is included in article HTML. Valid values are all (default) and none. When set to none, embedded images, video, audio, and inline media are removed while descriptive text and standard links are preserved.

Default: allPossible values:
Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/knowledge-bases/{id}/articles
GET /knowledge-bases/{id}/articles HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "approval_info": {
        "requested_at": "text",
        "reviewed_at": "text",
        "reviewed_by_user_id": "text",
        "status": "text"
      },
      "author_user_id": "text",
      "collection_id": "text",
      "created_at": "text",
      "current_draft_content_html": "text",
      "current_published_content_html": "text",
      "id": "text",
      "identifier": "text",
      "is_published": true,
      "is_unlisted": true,
      "last_edited_at": "text",
      "last_published_at": "text",
      "slug": "text",
      "tags": [
        {
          "hex_color": "text",
          "id": "text",
          "object_type": "issue",
          "value": "text"
        }
      ],
      "title": "text",
      "url": "text",
      "visibility_config": {
        "ai_agent_access": "inherit",
        "allowed_agent_ids": [
          "text"
        ],
        "customer_visibility_condition": {
          "field": "text",
          "operator": "equals",
          "subfilters": [
            {
              "field": "state",
              "operator": "equals",
              "value": "new"
            }
          ],
          "value": "text",
          "values": [
            "text"
          ]
        },
        "visibility": "public"
      }
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Create an article

post

Creates a new article within a knowledge base.

Rate limit: 10 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

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 containing the article.

is_publishedbooleanOptional

Whether the article should be published. Defaults to false.

is_unlistedbooleanOptional

Whether the article is accessible only via a 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
request_idstringOptional

The request ID for tracking.

post/knowledge-bases/{id}/articles
POST /knowledge-bases/{id}/articles HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 476

{
  "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": {
    "ai_agent_access": "inherit",
    "allowed_agent_ids": [
      "text"
    ],
    "customer_visibility_condition": {
      "field": "text",
      "operator": "equals",
      "subfilters": [
        {
          "field": "state",
          "operator": "equals",
          "value": "new"
        }
      ],
      "value": "text",
      "values": [
        "text"
      ]
    },
    "visibility": "public"
  }
}
{
  "data": {
    "approval_info": {
      "requested_at": "text",
      "reviewed_at": "text",
      "reviewed_by_user_id": "text",
      "status": "text"
    },
    "author_user_id": "text",
    "collection_id": "text",
    "created_at": "text",
    "current_draft_content_html": "text",
    "current_published_content_html": "text",
    "id": "text",
    "identifier": "text",
    "is_published": true,
    "is_unlisted": true,
    "last_edited_at": "text",
    "last_published_at": "text",
    "slug": "text",
    "tags": [
      {
        "hex_color": "text",
        "id": "text",
        "object_type": "issue",
        "value": "text"
      }
    ],
    "title": "text",
    "url": "text",
    "visibility_config": {
      "ai_agent_access": "inherit",
      "allowed_agent_ids": [
        "text"
      ],
      "customer_visibility_condition": {
        "field": "text",
        "operator": "equals",
        "subfilters": [
          {
            "field": "state",
            "operator": "equals",
            "value": "new"
          }
        ],
        "value": "text",
        "values": [
          "text"
        ]
      },
      "visibility": "public"
    }
  },
  "request_id": "text"
}

Get an article by its ID

get

Returns a single article by ID within the specified knowledge base.

Rate limit: 60 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The KnowledgeBaseID of the article to fetch.

article_idstringRequired

The ID of the article to fetch.

Query parameters
languagestringOptional

The language code to fetch the article in. If not provided, returns the default language.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/knowledge-bases/{id}/articles/{article_id}
GET /knowledge-bases/{id}/articles/{article_id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "approval_info": {
      "requested_at": "text",
      "reviewed_at": "text",
      "reviewed_by_user_id": "text",
      "status": "text"
    },
    "author_user_id": "text",
    "collection_id": "text",
    "created_at": "text",
    "current_draft_content_html": "text",
    "current_published_content_html": "text",
    "id": "text",
    "identifier": "text",
    "is_published": true,
    "is_unlisted": true,
    "last_edited_at": "text",
    "last_published_at": "text",
    "slug": "text",
    "tags": [
      {
        "hex_color": "text",
        "id": "text",
        "object_type": "issue",
        "value": "text"
      }
    ],
    "title": "text",
    "url": "text",
    "visibility_config": {
      "ai_agent_access": "inherit",
      "allowed_agent_ids": [
        "text"
      ],
      "customer_visibility_condition": {
        "field": "text",
        "operator": "equals",
        "subfilters": [
          {
            "field": "state",
            "operator": "equals",
            "value": "new"
          }
        ],
        "value": "text",
        "values": [
          "text"
        ]
      },
      "visibility": "public"
    }
  },
  "request_id": "text"
}

Update an article

patch

Updates an existing article. Only provided fields are modified.

Rate limit: 20 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

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.

is_publishedbooleanOptional

Whether the article should be published or unpublished.

is_unlistedbooleanOptional

Whether the article is accessible only via a direct link.

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.

tag_idsstring[]Optional

IDs of article tags to assign. If provided, replaces all tags currently assigned to the article.

titlestringOptional

The title of the article.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

patch/knowledge-bases/{id}/articles/{article_id}
PATCH /knowledge-bases/{id}/articles/{article_id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 414

{
  "body_html": "text",
  "is_published": true,
  "is_unlisted": true,
  "language": "text",
  "publish_updated_body_html": true,
  "tag_ids": [
    "text"
  ],
  "title": "text",
  "visibility_config": {
    "ai_agent_access": "inherit",
    "allowed_agent_ids": [
      "text"
    ],
    "customer_visibility_condition": {
      "field": "text",
      "operator": "equals",
      "subfilters": [
        {
          "field": "state",
          "operator": "equals",
          "value": "new"
        }
      ],
      "value": "text",
      "values": [
        "text"
      ]
    },
    "visibility": "public"
  }
}
{
  "data": {
    "approval_info": {
      "requested_at": "text",
      "reviewed_at": "text",
      "reviewed_by_user_id": "text",
      "status": "text"
    },
    "author_user_id": "text",
    "collection_id": "text",
    "created_at": "text",
    "current_draft_content_html": "text",
    "current_published_content_html": "text",
    "id": "text",
    "identifier": "text",
    "is_published": true,
    "is_unlisted": true,
    "last_edited_at": "text",
    "last_published_at": "text",
    "slug": "text",
    "tags": [
      {
        "hex_color": "text",
        "id": "text",
        "object_type": "issue",
        "value": "text"
      }
    ],
    "title": "text",
    "url": "text",
    "visibility_config": {
      "ai_agent_access": "inherit",
      "allowed_agent_ids": [
        "text"
      ],
      "customer_visibility_condition": {
        "field": "text",
        "operator": "equals",
        "subfilters": [
          {
            "field": "state",
            "operator": "equals",
            "value": "new"
          }
        ],
        "value": "text",
        "values": [
          "text"
        ]
      },
      "visibility": "public"
    }
  },
  "request_id": "text"
}

Delete an article

delete

Permanently deletes an article from the knowledge base.

Rate limit: 20 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The KnowledgeBaseID of the article to delete.

article_idstringRequired

The ID of the article to delete.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

delete/knowledge-bases/{id}/articles/{article_id}
DELETE /knowledge-bases/{id}/articles/{article_id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "request_id": "text"
}

Create a new route redirect

post

Creates a path redirect within a knowledge base, mapping a source path to an article or collection.

Rate limit: 10 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

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. Must be "article" or "collection".

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

post/knowledge-bases/{id}/route-redirects
POST /knowledge-bases/{id}/route-redirects HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}

Request review on an article

post

Requests human and/or AI review on the article's current draft version. At least one of reviewer_user_ids or request_ai_review must be provided. The article must have an unpublished current version. Requesting AI review requires the organization to have AI article review enabled.

Rate limit: 10 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the knowledge base the article belongs to.

article_idstringRequired

The ID of the article to request review for.

Body
request_ai_reviewbooleanOptional

When true, also queue an AI review. Requires the organization to have AI article review enabled.

reviewer_user_idsstring[]Optional

IDs of users to request a human review from. Each user must already be a configured reviewer for the article's knowledge base.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

post/knowledge-bases/{id}/articles/{article_id}/request-review
POST /knowledge-bases/{id}/articles/{article_id}/request-review HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55

{
  "request_ai_review": true,
  "reviewer_user_ids": [
    "text"
  ]
}
{
  "data": {
    "approval_status": "text",
    "article_id": "text",
    "article_version_id": "text"
  },
  "request_id": "text"
}

Last updated

Was this helpful?