Actions
Add pages
POST
/api/v1/projects/{id}/pages
Adds URLs on the project’s domain. Plan page limit applies; duplicates, off-site and invalid URLs are counted, not added.
- API key access
- Read and write
- Project permission
- Edit pages
- Success
- 200 — Processed
Parameters
Path
| Parameter | Type | Notes |
|---|---|---|
id required |
string | Project id |
Request body
JSON, with Content-Type: application/json.
| Field | Type | Notes |
|---|---|---|
urls required |
array of string | at least 1 item · at most 200 items |
Example request
Replace tk_live_YOUR_KEY with your API key and the ids with your own.
curl -X POST 'https://trackerv2.marketingplanet.global/api/v1/projects/6650a4c2e1b3d5f7a9c1e301/pages' \
-H 'Authorization: Bearer tk_live_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{
"urls": [
"https://acmeretail.com/products/trail-runner-3",
"https://acmeretail.com/sale",
"https://othersite.com/not-ours"
]
}'
const response = await fetch('https://trackerv2.marketingplanet.global/api/v1/projects/6650a4c2e1b3d5f7a9c1e301/pages', {
method: 'POST',
headers: {
Authorization: 'Bearer tk_live_YOUR_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"urls": [
"https://acmeretail.com/products/trail-runner-3",
"https://acmeretail.com/sale",
"https://othersite.com/not-ours"
]
}),
});
const result = await response.json();
if (!response.ok) throw new Error(`${result.error.code}: ${result.error.message}`);
console.log(result.data);
import requests
response = requests.post(
"https://trackerv2.marketingplanet.global/api/v1/projects/6650a4c2e1b3d5f7a9c1e301/pages",
headers={"Authorization": "Bearer tk_live_YOUR_KEY"},
json={
"urls": [
"https://acmeretail.com/products/trail-runner-3",
"https://acmeretail.com/sale",
"https://othersite.com/not-ours",
],
},
)
result = response.json()
if not response.ok:
raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result["data"])
Example response
{
"data": {
"added": 2,
"duplicates": 0,
"invalid": 0,
"offsite": 1,
"duplicateInBatch": 0,
"capped": 0,
"alreadyBroken": 0,
"submitted": 3,
"pagesCount": 130
}
}
Response fields
| Field | Type | Notes |
|---|---|---|
data |
object | |
data.added |
integer | |
data.duplicates |
integer | |
data.invalid |
integer | |
data.offsite |
integer | |
data.duplicateInBatch |
integer | |
data.capped |
integer | |
data.alreadyBroken |
integer | |
data.submitted |
integer | |
data.pagesCount |
integer |
Errors
Besides the errors any request can return (bad or missing key, plan, scope, rate limit), this endpoint can return:
| Status | error.code | Meaning |
|---|---|---|
| 400 | invalid-request | A parameter or body field is missing or invalid; error.message says which. |
| 400 | too-many-urls | More than 200 URLs in one request. Split them into batches. |
| 404 | not-found | The resource does not exist or you cannot open it. Tracker does not reveal which. |
| 403 | flag-editPages | Your project membership does not include editing pages. |
| 403 | forbidden | The account is restricted: reads still work, but changes that add or modify projects, pages or monitors are blocked (error.accountStatus is restricted). |
Errors always look like { "error": { "code": "…", "message": "…" } }. See Errors & limits.