Creates an empty content plan
Pass your API Key as a Bearer Token.
This endpoint has no request query parameters.
The request body for this endpoint is a JSON payload with the following keys:
Key | Description | Type | Example |
---|---|---|---|
name | Name of Content Planrequired | String | "Awesome Content Ideas" |
description | Description of Content Planrequired | String | "A few ideas for content to put on the blog." |
keywords | Keywordsrequired | String | "travel, paris, europe" |
Here's an example of the body parameters represented as a JSON object.
{
"name": "Awesome Content Ideas",
"description": "A few ideas for content to put on the blog.",
"keywords": "travel, paris, europe"
}
Command Line (curl)
curl -X POST "https://nichesss.com/api/content-plans" -H "Content-type: application/json" -H "Authorization: Bearer <YOUR_API_KEY>" -d "{\"name\":\"Awesome Content Ideas\",\"description\":\"A few ideas for content to put on the blog.\",\"keywords\":\"travel, paris, europe\"}"
JavaScript
fetch('https://nichesss.com/api/content-plans', {
method: 'POST',
headers: {
'Content-type': 'application/json',
'Authorization': 'Bearer <YOUR_API_KEY>',
},
body: JSON.stringify({"name":"Awesome Content Ideas","description":"A few ideas for content to put on the blog.","keywords":"travel, paris, europe"})
})
.then((response) => response.json())
.then((data) => console.log(data));
Python
import requests
url = 'https://nichesss.com/api/content-plans'
payload = {"name":"Awesome Content Ideas","description":"A few ideas for content to put on the blog.","keywords":"travel, paris, europe"}
headers = {'Content-type': 'application/json', 'Authorization': 'Bearer <YOUR_API_KEY>'}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(data)
PHP
$api_key = '<YOUR_API_KEY>';
$request_url = 'https://nichesss.com/api/content-plans';
$request_options = array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/json' . "\r\n" .
'Authorization: Bearer ' . $api_key . "\r\n",
'content' => '{"name":"Awesome Content Ideas","description":"A few ideas for content to put on the blog.","keywords":"travel, paris, europe"}'
)
);
$request_context = stream_context_create($request_options);
$request_result = file_get_contents($request_url, false, $request_context);
$data = json_decode($request_result);
echo $data;
Ruby
require 'net/http'
require 'json'
uri = URI('https://nichesss.com/api/content-plans')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request['Content-type'] = 'application/json'
request['Authorization'] = 'Bearer <YOUR_API_KEY>'
request.body = {"name":"Awesome Content Ideas","description":"A few ideas for content to put on the blog.","keywords":"travel, paris, europe"}.to_json
response = http.request(request)
puts JSON.parse(response.body)
All responses from the API are JSON
{
"message": "Content plan successfully created.",
"success": true,
"id": "Owq8tD8Gb"
}