Post a Question

You can use this request to post a new question to your AnswerHub site.

/services/v2/question.json

You can use the following parameters in your post a question request:

Body: you can use any field of the body parameter.
Other options: wrap.

🚧

Permissions & Notes:

  • You must have the Ask questions (submitting the question) permission under Standard Roles in the Advanced Editor.

  • If you want the question published automatically, you must also have the Publish questions permission under Standard Roles in the Advanced Editor.

  • The Location response header will contain the URL for the newly created question.

  • Before using this request, check to make sure the question was not already asked by using the Verify a question is new request.

    • You must include at least one topic in your question.
  • You can specify the data describing the question you are posting, both in the body of the request, or as a request parameter, with the same names as the fields in the body.

    • When you send data in the body of the request, the format should match the URL extension, or the value of the site's HTTP request header content-type.
    • If you specify data values for the same field, both on the request body, and as request or query parameters, the value of the parameters takes precedence over the value in the body.
  • We added this request in version 1.6.3.

Sample Request

A POST post a question request to https://apidocs.cloud.answerhub.com using a human-readable username and password (answerhub/test123) with a title ("How do I post a question?"), body ("Please help me figure this out."), and topic ("helpme"), would look like this:

curl 
-H "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X POST 
-d '{"title":"How do I know if my question is a good question?","body":"Please help me figure this out.","topics":"helpme"}' "https://apidocs.cloud.answerhub.com/services/v2/question.json" -v
Language
Credentials
Basic
base64
:
Click Try It! to start a request and see the response here!