PUT /faqs/[id] - Update a Post

PUT /faqs/[id] - Update a Post

Last update: pondělí, říj 28, 2019
https://xeno.app/rest/v2/faqs/[id]


Headers

Authorization: Bearer TOKEN

Content-Type: application/json

Body:

{
	"title": "Updated FAQ",
	"content": "<p>Awesome FAQ!</p>",
	"status": "published",
	"canned_response": true,
	"faq_category_id": 42,
	"widgets": ["api_key_1", "api_key_2"]
}


Example Request

require "uri"
require "net/http"

url = URI("https://xeno.app/rest/v2/faqs/[id]")

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": "Updated 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

REST API - Posts

5 article in this category.