Definition
The postCampaign API Command allows for the creation of a new inbound link analysis campaign. The command is processed in a queue, meaning that the result will be available after finishing creating the new campaign.
Cost
Using this command consumes 1 credit. *It will also consume credits from the site credits pool.
Module
The command is included in the Campaign API Module and will only consume credits assigned for Campaign API Operations.
Parameters
| campaignName | The name for the new campaign. |
| nrSites | Number of sites for the new campaign to keep track of. It can take any value between 1 and 6. |
| site1 | The URL for the website you wish to track. |
|
site1Type |
The type of analysis done for the website. Can take the following values: url – analyzes the inbound links for the inserted url; prefix – analyzes the inbound links for the url’s prefix; subdomain – analyzes the inbound links for the url’s subdomain; domain – analyzes the inbound links for the url’s domain. |
| campaignType | Choose the type of campaign: “recurring” or “onetime”. |
| sitewide | Optional Parameter – Takes value between 1 and 20 (default 10). Representing the number of inbound links analyzed per page. |
| excludeInternalLinks | Optional Parameter – Ignore inbound links from internal pages. The values taken of this parameter are “Yes” and “No”. (default “yes”) |
Input URL Example
http://api.cognitiveseo.com/command.php?apiKey=your_api_key&command=postCampaign&campaignName=CampaignName&nrsites=1&site1=http://cognitiveseo.com&site1Type=url&campaignType=onetime&sitewide=4
Output Example
Running this command will result in the following JSON output:
{
"api": "cognitiveSEO API",
"data": {
"status": "success",
"data": {
"campaignId": "8",
"site1Id": 12,
"site1Url": "http:\/\/cognitiveseo.com"
},
"credits": 1
},
"time": 0.469
}
Output Details
| status | The status of the command (success or error). |
| campaignId | Shows the ID number generated for the newly created campaign. |
| site1Id | The ID number generated to the website you entered in the campaign. |
| site1Url | The URL of the website entered in the campaign. |
| credits | The credit cost of the command. |
| time | The time it took to process the command. |