Create Article
Creates a knowledge-base article. The URL slug is generated from the title rather than supplied. Public articles belong to a collection and appear on the help center once published; internal articles are not browsable and exist to answer support questions. Requires a logged-in user. The caller becomes the article's author, so an API key alone is not enough.
Authorization
Authorization In: header
Path Parameters
ID of the project that will own the article.
Request Body
application/json
Audience for the article: public articles appear on the help center, internal ones are only used to answer support questions.
Article title.
Publication state. Only published articles are visible on the help center or returned by public search.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://www.saasco.com/api/v2/projects/string/knowledge/articles" \ -H "Content-Type: application/json" \ -d '{ "type": "public", "title": "string", "body": "string", "state": "draft" }'{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"projectId": "string",
"type": "public",
"title": "string",
"slug": "string",
"description": "string",
"body": "string",
"url": "string",
"state": "draft",
"order": -9007199254740991,
"collectionId": "string",
"authorId": "string",
"views": -9007199254740991,
"conversions": -9007199254740991,
"happyReactions": -9007199254740991,
"neutralReactions": -9007199254740991,
"sadReactions": -9007199254740991
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Get Article
Fetches one article by ID for editing, including drafts and internal articles. Returns `null` rather than 404 when nothing matches. Use Get Public Article for the reader-facing lookup, which is by slug and only returns published content.
Update Article
Updates an article. Despite the PUT, only the fields present in the body are written. Two side effects are worth knowing: changing the title regenerates the URL slug, which breaks existing links to the article; and switching `type` to `internal` clears its collection, removing it from help-center navigation. Moving between `draft` and `published` is what controls public visibility.