Posting content using the Faqprime CMS API

1Answer

Overview

This API endpoint allows you to post content to the Faqprime CMS programmatically. By making a POST request to this endpoint, you can create and publish new content on the Faqprime CMS by means of adding a question followed by adding the answer to that question.

 

Posting a question:

Base URL 

https: //yourdomain.myfaqprime.com/json/add-question?keypass=<keypass>&keysecret=<keysecret>

 

POST Params:

FieldTypeDescription
'title'string

The title of the content.

'content'

string

The main body of the content (optional) in HTML format.

'categoryid'

integer

The ID of the category to which the content belongs.

'tags'

string

Tags associated with the content separated by commas

 

Response (JSON):

FieldTypeDescription
'error'booleanBoolean value indicating success('true'/'false').

 

'questionid'

integer

QuestionID if the operation is successful.

 

'errorreason'

integer

Optional field, present only if error is true.
'timestamp'integer

Integer value representing the Unix timestamp.

 

Example response JSON

{
  "error": false,
  "questionid": 123456,
  "errorreason": null,
  "timestamp": 1593650823
}

 

Posting an Answer: 

Base URL: 

https:// yourdomain.myfaqprime.com/json/add-answer?keypass=<keypass>&keysecret=<keysecret>

POST Params 

FieldTypeDescription
'questionid'integerQuestion ID of the question on which this answer will be added.
'content'

string

The main body of the answer in HTML format.

 

Response (JSON)

FieldTypeDescription
'error'booleanBoolean value indicating success('true'/'false').

'answerid'

integer

Answer ID if the operation is successful. 
'errorreason'

integer

Optional field, present only if error is true.
'timestamp'integer

Integer value representing the Unix timestamp.

 

Example response JSON:

{
  "error": false,
  "answerid": 123456,
  "timestamp": 1593650823
}

 

Error Handling

In case of errors, the API will return an appropriate 'errorreason' with error field set to 'true' in the response JSON. 

 

Authentication

To post the content using Faqprime CMS API, you need to include the keysecret and keypass in the URL of each request. You can obtain the API key pass and secret by signing up for an account on the Faqprime.

Please note that the API credentials should be kept secure and should not be shared publicly.

Did this answer your question?
...