Create an Item

Creates a new Item within a particular Project.

Response Code

202

Arguments

project_id The ID for the Project
name The name for the new Item
parent_id (optional) Parent Item ID
template_id (optional) Template ID to apply
config (optional) Config object containing tabs and field information

Definition

POST: /items

cURL Example

curl https://api.gathercontent.com/items \ -u [email protected]:<YOUR_API_KEY> \ -H "Accept: application/vnd.gathercontent.v0.5+json" \ -X POST --data "project_id=123456&name=Page Name"

PHP Example

<?php
$username 
[email protected]';
$apikey '<YOUR_API_KEY>';

$data = array(
    
'project_id' => '<PROJECT_ID>',
    
'name' => '<PROJECT_NAME>',
    
'parent_id' => '<PARENT_ID>',
    
'template_id' => '<TEMPLATE_ID>'
);

$ch curl_init();

curl_setopt$chCURLOPT_HTTPAUTHCURLAUTH_BASIC);
curl_setopt$chCURLOPT_HTTPHEADER, array('Accept: application/vnd.gathercontent.v0.5+json'));
curl_setopt$chCURLOPT_USERPWD$username ':' $apikey);
curl_setopt$chCURLOPT_URL'https://api.gathercontent.com/items');
curl_setopt$chCURLOPT_RETURNTRANSFERtrue );
curl_setopt$chCURLOPT_POSTtrue );
curl_setopt$chCURLOPT_POSTFIELDShttp_build_query($data));

$response json_decodecurl_exec$ch ) );
curl_close$ch );

Great, welcome aboard!

That’s it! You’re signed up to our mailing list and can expect content strategy goodness in your inbox soon.