Integrating the CMS API into your publishing workflow triggers priority auditing of the page you're working on for on-the-fly auditing. This allows you to see the results in ContentKing immediately after making a change.
Retrieving your CMS API token
To use the CMS API you need to get your ContentKing account's CMS API token. You'll find it in the Account section, under the Account Settings tab.
Every time you make a change through your CMS, such as adding, deleting, or changing a page, you need your website to call the ContentKing API. You do this using a POST-request to the following endpoint:
API request headers
When making a request you need to send along the following request headers:
Note: you need to provide the string "token" followed by a space and your actual API token.
API request body
Then, as the body of the request, you need to send a JSON object containing the full URL you want ContentKing to check:
Note: don't forget to include the domain name and protocol (
https) in your request.
API return codes
After sending the call, the ContentKing API will reply with one of the following responses:
This response means that the request was successfully processed and that the page will be checked immediately.
This response means that the request was received, but that it's lacking an authorization token and can therefore not be processed. Make sure to correctly set the Authorization header.
If you get this response it means that the request could not be processed because the supplied API token is invalid or expired.
This response means that the request was received, but that the authorization wasn't formatted correctly. Make sure to correctly set the Authorization header.
If you receive this response it means that you sent an incorrectly formatted URL. Double-check that you sent a fully qualified URL, including the domain name and protocol.
When you get this response, the website you're requesting for doesn't exist in the ContentKing account belonging to the API token.
Need some help with integrating the CMS API?
In case you or your developer need any help with integrating the API don't hesitate to reach out. We're always happy to help!