Mark Assets as Spam
Flag an asset as spam (or remove the flag) for your organization. Spam-flagged assets are excluded from your organization's positions and portfolio views across every portfolio, so unwanted or junk tokens stop cluttering your data.
Spam flags are tracked per asset instance and applied at the organization level — flagging an asset hides it for all portfolios in the organization, not just one.
Endpoint
Organization API only — these endpoints require an organization-level API key with WRITE scope. A READ-scoped key returns 403.
POST https://ddp.definitive.fi/v2/organization/spam-assets
DELETE https://ddp.definitive.fi/v2/organization/spam-assetsPOST— mark an asset as spam.DELETE— remove the spam flag from an asset.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| assetInstanceId | string | Yes | UUID of the asset instance to flag / unflag. |
The
assetInstanceIdis theasset.idvalue returned by the List Positions endpoint.
Request Body Examples
Mark an Asset as Spam
const json = await AuthHelpers.signAndSend({
path: "/v2/organization/spam-assets",
method: "POST",
body: {
assetInstanceId: "00000000-0000-0000-0000-000000000001",
},
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});Remove the Spam Flag
const json = await AuthHelpers.signAndSend({
path: "/v2/organization/spam-assets",
method: "DELETE",
body: {
assetInstanceId: "00000000-0000-0000-0000-000000000001",
},
apiKey: process.env.API_KEY,
apiSecret: process.env.API_SECRET,
});Response
Both endpoints return the organization's complete, updated list of spam-flagged asset instance IDs.
[
"00000000-0000-0000-0000-000000000001",
"00000000-0000-0000-0000-000000000002"
// ... all assets currently flagged as spam for the organization
];Notes
- Requests are idempotent — re-flagging an already-flagged asset (or unflagging one that isn't flagged) succeeds and returns the current list without error.
- Flagging applies to the entire organization; the flagged asset is hidden from positions and portfolio views across all of its portfolios.
- A
403response indicates the API key is READ-scoped — use a WRITE-scoped key for these endpoints.