CentralCSP
APIInventory Scripts

Reject a script

Rejects the script with a reason saying why it should not run on a payment page, and clears any approval. Send the currentHash you read as hash: a script that changed since answers 409 script_changed. This records your decision but does not block the script, so remove it from the page or block it with your Content-Security-Policy, and presence shows whether browsers still load it.

Limited to 120 requests a minute for each person, after which it answers 429 with a Retry-After header. Every decision on a script or on a header value counts toward the same budget.

Requires the analyst role on the website and the compliance plan feature.

POST
/v1/workspaces/{workspaceId}/websites/{websiteId}/compliance/scripts/{inventoryId}/reject

Authorization

headerAuthorizationBearer <JWT>

An OpenID Connect access token from signing in to CentralCSP, acting as the signed-in user.

Path Parameters

workspaceId*string

The workspace's id.

websiteId*string

The website's id.

inventoryId*string

The inventory script's id.

Request Body

application/json
  1. body

Why the script does not belong on a payment page.

hash*|

The script's currentHash as you read it, null when the script has none. The decision applies only to that content: if the script changed since, it is refused with 409 script_changed and nothing is recorded.

reason*string

Why this script does not belong on a payment page.

Match\S
Length1 <= length <= 4096

Response Body

A script seen on a payment page.

application/json
  1. response
id*string

The script's id in the inventory.

websiteId*string

The website it belongs to.

subresourceUrl*string

URL of the script.

status*InventoryStatus

not_reviewed means nobody has looked at it yet. approved means it is authorized at its current hash. needs_review means it was approved but its contents have since changed. rejected means a person or a reject rule decided it does not belong on a payment page. out_of_scope means an exclude rule or a person took it out of PCI scope, for example a script a browser extension injects.

Value in"not_reviewed""approved""needs_review""rejected""out_of_scope"
change*ScriptChange

Whether the script's content changed since it was first seen on a payment page. new: its hash never changed. changed: its hash changed at least once. A decision does not reset it: an approved script whose content changed earlier still reads changed.

Value in"new""changed"
presence*|

Whether browsers still load a script that is rejected, from what the payment pages reported over the last 7 days. still_loaded: the pages still load it, which keeps the website's script side in action_needed until you remove it or block it with your Content-Security-Policy. rarely_reported: reported only now and then, as a visitor's extension or an old copy of a page would, and it never changes a status. null for a script that is not rejected, is retired, or was not reported from a payment page in the last 7 days. A rejected script whose recent figures are not known reads still_loaded.

recentReports*|

What the payment pages reported of the script over the last 7 days, for the scripts in scope that are not retired: every rejected one (the figures presence is read from) and the most reported others. null for a script out of scope, retired, outside the most reported, or whose recent figures are not known. A script with no report in the window reads 0.

justification*|

Why the script is allowed to run, while it is approved or needs_review after an approval. null for a script that is out of scope: its reason is outOfScopeReason.

originId*|

The inventory origin this script belongs to.

origin*|

The origin serving the script.

tags*array<>

Tags applied to this script, by hand or by a rule.

approvedHash*|

The hash the approval was given for. null for a script that is out of scope.

currentHash*|

The hash last reported by browsers. When it differs from approvedHash the script needs review again.

ruleId*|

The rule that approved this script, rejected it or put it out of scope, or null when a person did or the rule has since been deleted.

ruleName*|

The name of the rule that approved this script, rejected it or put it out of scope, kept after the rule is deleted, or null when a person did.

approvedBy*|

Identifier of the person who approved it, or null when a rule did or once their account is deleted.

approvedByName*|

Name of the person who approved it, kept after their account is deleted.

approvedByEmail*|

Email of the person who approved it.

approvedByPicture*|

The picture the person who approved it has today, or null when they have none or their account is deleted. The name and email are the ones recorded with the decision; the picture is not.

approvedByDeleted*boolean

true when the person who approved it can no longer be named.

approvedAt*|

When it was approved.

rejectionReason*|

Why the script was rejected.

rejectedBy*|

Identifier of the person who rejected it, or null once their account is deleted.

rejectedByName*|

Name of the person who rejected it, kept after their account is deleted.

rejectedByEmail*|

Email of the person who rejected it.

rejectedByPicture*|

The picture the person who rejected it has today, or null when they have none or their account is deleted. The name and email are the ones recorded with the decision; the picture is not.

rejectedByDeleted*boolean

true when the person who rejected it can no longer be named.

rejectedAt*|

When it was rejected.

outOfScopeReason*|

Why the script is out of PCI scope: the text of the rule that put it there, or the reason the person gave. null unless status is out_of_scope, like every outOfScope field.

outOfScopeBy*|

Identifier of the person who put it out of scope, or null when a rule did (ruleName then names it) or once their account is deleted.

outOfScopeByName*|

Name of the person who put it out of scope, kept after their account is deleted.

outOfScopeByEmail*|

Email of the person who put it out of scope.

outOfScopeByPicture*|

The picture the person who put it out of scope has today, or null when they have none or their account is deleted. The name and email are the ones recorded with the decision; the picture is not.

outOfScopeByDeleted*boolean

true when the person who put it out of scope can no longer be named.

outOfScopeAt*|

When it was put out of scope, by the rule or the person.

retiredAt*|

When the script left the PCI scope, or null while it is still seen on a payment page. Retired scripts are listed only with includeRetired, and return automatically if the script reappears.

firstSeen*|

When the script was first reported on a payment page.

lastSeen*|

When it was last reported.

contentFirstSeenAt*|

When the script's current content (currentHash) was first seen: its first report for a script whose content never changed, otherwise when its latest content change was recorded. null for a script whose last change is older than the history kept.

createdAt*string

When the script entered the inventory.

Formatdate-time
updatedAt*string

When its inventory entry last changed.

Formatdate-time
Example Request
curl -X POST 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/compliance/scripts/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/reject' \  -H 'Content-Type: application/json' \  -d '{  "hash": "sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",  "reason": "Marketing tag added without review. Removal requested from the growth team."}'
Example Response
{  "id": "01990b7e-4c1a-7d2e-9b3f-5a6c7d8e9f01",  "websiteId": "01990b7e-4c1a-7d2e-9b3f-5a6c7d8e9f00",  "subresourceUrl": "https://js.stripe.com/v3/",  "status": "not_reviewed",  "change": "changed",  "presence": "still_loaded",  "recentReports": {    "reports": 1240,    "browsers": [      "Chrome",      "Firefox",      "Safari"    ],    "daysWithReport": 7,    "paymentPages": 2,    "computedAt": "2026-10-01T08:00:00.000Z"  },  "justification": "Stripe.js, required for card payments.",  "originId": "01990b7e-4c1a-7d2e-9b3f-5a6c7d8e9f02",  "origin": "https://js.stripe.com",  "tags": [    {      "id": "01990b7e-4c1a-7d2e-9b3f-5a6c7d8e9f02",      "name": "payment provider",      "color": "slate"    }  ],  "approvedHash": "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC",  "currentHash": "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC",  "ruleId": "01990b7e-4c1a-7d2e-9b3f-5a6c7d8e9f02",  "ruleName": "First-party bundles",  "approvedBy": "3f6c2a1e-8b4d-4e7a-9c1f-5d2b7e8a0c43",  "approvedByName": "Dana Reed",  "approvedByEmail": "dana@example.com",  "approvedByPicture": "https://lh3.googleusercontent.com/a/example",  "approvedByDeleted": true,  "approvedAt": "2026-10-01T08:00:00.000Z",  "rejectionReason": "Unknown third-party script, not part of our checkout.",  "rejectedBy": "3f6c2a1e-8b4d-4e7a-9c1f-5d2b7e8a0c43",  "rejectedByName": "Dana Reed",  "rejectedByEmail": "dana@example.com",  "rejectedByPicture": "https://lh3.googleusercontent.com/a/example",  "rejectedByDeleted": true,  "rejectedAt": "2026-10-01T08:00:00.000Z",  "outOfScopeReason": "Injected by a visitor's password manager extension, not served by our pages.",  "outOfScopeBy": "3f6c2a1e-8b4d-4e7a-9c1f-5d2b7e8a0c43",  "outOfScopeByName": "Dana Reed",  "outOfScopeByEmail": "dana@example.com",  "outOfScopeByPicture": "https://lh3.googleusercontent.com/a/example",  "outOfScopeByDeleted": true,  "outOfScopeAt": "2026-10-01T08:00:00.000Z",  "retiredAt": "2026-10-01T08:00:00.000Z",  "firstSeen": "2026-10-01T08:00:00.000Z",  "lastSeen": "2026-10-01T08:00:00.000Z",  "contentFirstSeenAt": "2026-10-01T08:00:00.000Z",  "createdAt": "2026-10-01T08:00:00.000Z",  "updatedAt": "2026-10-01T08:00:00.000Z"}