Before you Begin
Before using the Knowledge Base Article Submission API, you need to:- Get your API Key Id and Secret
- Ensure your API key has been configured to access Knowledge Base APIs. Reach out to your ASAPP team if you need access enabled.
Step 1: Create a submission
To import an article via API, you need to create asubmission
. A submission is the attempt to import an article. It will still need to be reviewed and published like any other imported article.
To create a submission, you need to specify:
title
: The title of the articlecontent
: The content of the article
There are additional optional fields that can be used to improve the articles such as
url
, metadata
, and queryExamples
. More information can be found in the API Reference.url
and metadata
:
Step 2: Article Processing
The Article Submission API submits the article that will still need to be reviewed and published like any other imported article. You can check the status of the submission by calling the Get a Submission API. The response will include theid
of the submission and the status
of the submission.
Step 3: Publication and Updates
Once the submission is approved, the article will be published and become available in the Knowledge Base. The status of the submission will be updated toACCEPTED
and you will see it within the ASAPP AI-Console UI.
You can also update the article after it has been published by creating another submission with the same articleId
.
Troubleshooting
Common API response codes and their solutions:500 - Internal Server Error
500 - Internal Server Error
If you receive a
500
code, there is an issue with the server. Wait and try again.If the error persists, contact your ASAPP Team.400 - Bad Request
400 - Bad Request
The
400
code usually means missing required parameters.Recheck your request body and try again.401 - Unauthorized
401 - Unauthorized
413 - Request Entity Too Large
413 - Request Entity Too Large
The request body is too large. Article content is limited to 200,000 Unicode characters.Try again with less content.