https://polaria.ai/rest/v2/faqs
Authorization: Bearer TOKEN
Content-Type: application/json
Body:
{
"title": "New FAQ",
"content": "<p>Awesome FAQ!</p>",
"status": "published",
"faq_category_id": 42,
"widgets": ["api_key_1", "api_key_2"],
"language": "fr"
}
require "uri"
require "net/http"
url = URI("https://polaria.ai/rest/v2/faqs")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer TOKEN"
request["Content-Type"] = "application/json"
request.body = '{ "title": "New FAQ", "content": "<p>Awesome FAQ!</p>", "status": "published", "canned_response": true, "faq_category_id": 42, "widgets": ["api_key_1", "api_key_2"] }'
response = https.request(request)
puts response.read_body