If you’re using Zapier, “API Request (Beta)” under the Gainsight CC Zapier Actions will simplify things quite a bit for you. You won’t need to worry about headers, etc. (Also if you’re using webhooks by Zapier, you’d first need to do an API call to authenticate with the API, so the Gainsight CC saves you a step)
For the data, follow the example Payload the API documentation provides.
{
"title": "Welcome to the community",
"content": "Is this your first visit to our community-driven Help Center? Well then welcome to our small world of awesomeness!",
"categoryId": 31,
"poll": {
"title": "Which option sounds better?",
"options":
"Option A",
"Option B",
"Other"
]
},
"tags":
"new",
"welcome"
],
"sticky": false,
"closed": false,
"moderatorTags": e
"highlighted"
]
}
It’s a set of key value pairs where you’re 1.) listing the field of the post, and 2.) providing the content for it. Not all of them are required, just Title, Content, and categoryId.
But here’s the tricky part, the content of your post probably needs some formatting. If you provide the content in HTML, that styling will come through. However, some HTML characters may mess up the data structure of the JSON payload and cause the API call not to work. (That’s where my expertise ends, I’ve had to get more technical colleagues to help me for similar use cases in the past, and even then we ended up abandoning the use case.)