openapi: 3.0.1 info: title: Pylon Accounts Knowledge Base API description: REST API for Pylon (usepylon.com), the B2B customer support and customer operations platform. Programmatically manage issues (tickets), accounts, contacts, users, teams, tags, custom fields, the knowledge base, and tasks/projects. Authentication uses a Bearer API token; only Admin users can create API tokens in Pylon settings. termsOfService: https://usepylon.com/terms contact: name: Pylon Support url: https://docs.usepylon.com/pylon-docs/developer/api version: '1.0' servers: - url: https://api.usepylon.com description: Pylon production API security: - bearerAuth: [] tags: - name: Knowledge Base description: Knowledge bases, collections, and articles. paths: /knowledge-bases: get: operationId: listKnowledgeBases tags: - Knowledge Base summary: List knowledge bases responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/KnowledgeBase' /knowledge-bases/{id}/collections: parameters: - name: id in: path required: true schema: type: string get: operationId: listCollections tags: - Knowledge Base summary: List collections responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Collection' post: operationId: createCollection tags: - Knowledge Base summary: Create a collection requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Collection' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Collection' /knowledge-bases/{id}/collections/{collection_id}: parameters: - name: id in: path required: true schema: type: string - name: collection_id in: path required: true schema: type: string patch: operationId: updateCollection tags: - Knowledge Base summary: Update a collection requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Collection' responses: '200': description: OK delete: operationId: deleteCollection tags: - Knowledge Base summary: Delete a collection responses: '200': description: OK /knowledge-bases/{id}/articles: parameters: - name: id in: path required: true schema: type: string get: operationId: listArticles tags: - Knowledge Base summary: List articles parameters: - name: cursor in: query required: false schema: type: string - name: limit in: query required: false schema: type: integer responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/Article' pagination: $ref: '#/components/schemas/Pagination' post: operationId: createArticle tags: - Knowledge Base summary: Create an article requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Article' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Article' /knowledge-bases/{id}/articles/{article_id}: parameters: - name: id in: path required: true schema: type: string - name: article_id in: path required: true schema: type: string get: operationId: getArticle tags: - Knowledge Base summary: Get an article responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Article' patch: operationId: updateArticle tags: - Knowledge Base summary: Update an article requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Article' responses: '200': description: OK delete: operationId: deleteArticle tags: - Knowledge Base summary: Delete an article responses: '200': description: OK /knowledge-bases/{id}/route-redirects: post: operationId: createRouteRedirect tags: - Knowledge Base summary: Create a route redirect parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: type: object properties: from_path: type: string to_path: type: string responses: '200': description: OK components: schemas: Pagination: type: object properties: cursor: type: string has_next_page: type: boolean KnowledgeBase: type: object properties: id: type: string name: type: string slug: type: string Article: type: object properties: id: type: string title: type: string slug: type: string body_html: type: string collection_id: type: string published: type: boolean created_at: type: string format: date-time updated_at: type: string format: date-time Collection: type: object properties: id: type: string title: type: string description: type: string parent_collection_id: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: Pylon API token passed as a Bearer token in the Authorization header. Only Admin users can create API tokens in Pylon settings.