CentralCSP
APIInventory Origins

Update an inventory origin

Corrects an origin's classification or records what it is for, for example "payment provider, contractually approved". Useful when a CDN you own was classified third-party. Only the fields you send are changed.

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

PATCH
/v1/workspaces/{workspaceId}/websites/{websiteId}/compliance/origins/{originId}

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.

originId*string

The origin's id.

Request Body

application/json
  1. body
description?|

Your note about this origin. Send null to clear it.

originType?OriginType

Set automatically when the origin is first seen: first-party when it matches the website's own host, third-party otherwise. Correct it when a CDN you control was classified third-party.

Value in"first-party""third-party"

Response Body

An origin that serves scripts to payment pages.

application/json
  1. response
id*string
workspaceId*string
websiteId*string
origin*string

The origin scripts are served from.

description*|

Your note about what this origin is and why it is allowed.

originType*OriginType

Set automatically when the origin is first seen: first-party when it matches the website's own host, third-party otherwise. Correct it when a CDN you control was classified third-party.

Value in"first-party""third-party"
tags*array<>

Tags carried by this origin's scripts.

createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.centralcsp.com/v1/workspaces/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/websites/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90/compliance/origins/01936b7a-6f2e-7c31-9a4d-2f8e1c5b7d90' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "workspaceId": "string",  "websiteId": "string",  "origin": "https://js.stripe.com",  "description": "string",  "originType": "first-party",  "tags": [    {      "id": "string",      "name": "string",      "color": "slate"    }  ],  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}