POST
/
asset
/
list
curl --request POST \
  --url https://app.chainpatrol.io/api/v2/asset/list \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "URL",
  "status": "BLOCKED",
  "startDate": "<string>",
  "endDate": "<string>"
}'
{
  "assets": [
    {
      "content": "<string>",
      "type": "URL",
      "status": "UNKNOWN",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ]
}

The /asset/list API will soon require an API Key, whereas previously this API was usable without an API Key. Please double check you are using a ChainPatrol issued API key.

We’ve recently updated this endpoint to support pagination. If you encounter errors related to payload size, please consider using the pagination feature as described below.

Pagination

To use pagination, include the per_page and next_page parameters in your request:

  • per_page <number>: Number of items to return per page (max: 10000)
  • next_page <string>: Cursor for the next page of results

Example implementation for pagination:

async function fetchAllAssets(type, status) {
  let allAssets = [];
  let nextPage = null;
  while (true) {
    const response = await fetch(
      "https://app.chainpatrol.io/api/v2/asset/list",
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "X-API-KEY": "YOUR_API_KEY_HERE",
        },
        body: JSON.stringify({
          type,
          status,
          per_page: 500,
          next_page: nextPage,
        }),
      }
    );
    const data = await response.json();
    allAssets = allAssets.concat(data.assets);
    nextPage = data.next_page;
    if (!nextPage) {
      break;
    }
  }
  return allAssets;
}
fetchAllAssets("URL", "BLOCKED")
  .then((assets) => console.log("All assets:", assets))
  .catch((error) => console.error("Error fetching assets:", error));

Body

application/json

List asset request body

Defaults to getting all the updates in the last 1 day.

You can also choose a startDate and endDate for the range of asset updates, most timestamp formats should work, we use Luxon for parsing the dates.

type
enum<string>
required

Asset type

Available options:
URL,
PAGE,
ADDRESS,
DISCORD,
LINKEDIN,
TWITTER,
FACEBOOK,
YOUTUBE,
REDDIT,
TELEGRAM,
GOOGLE_APP_STORE,
APPLE_APP_STORE,
AMAZON_APP_STORE,
MICROSOFT_APP_STORE,
TIKTOK,
INSTAGRAM,
THREADS,
MEDIUM,
CHROME_WEB_STORE,
MOZILLA_ADDONS,
OPERA_ADDONS,
EMAIL,
PATREON,
OPENSEA,
FARCASTER
status
enum<string>
default:
BLOCKED

Status of the assets to retrieve

Available options:
UNKNOWN,
ALLOWED,
BLOCKED
startDate
string

The start date to list assets from. This should be in the format YYYY-MM-DD and is inclusive.

endDate
string

The end date to list assets from. This should be in the format YYYY-MM-DD and is inclusive.

Response

200
application/json
Successful response

Successful operation

assets
object[]
required