curl --request GET \
--url https://app.chainpatrol.io/api/v2/organization/assets \
--header 'X-API-KEY: <api-key>'{
"assets": [
{
"id": 123,
"content": "<string>",
"type": "URL",
"status": "UNKNOWN",
"name": "<string>",
"description": "<string>",
"group": {
"id": 123,
"name": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"next_page": "<string>"
}List all assets belonging to your organization with optional filtering by type, group, and search query. Supports pagination.
curl --request GET \
--url https://app.chainpatrol.io/api/v2/organization/assets \
--header 'X-API-KEY: <api-key>'{
"assets": [
{
"id": 123,
"content": "<string>",
"type": "URL",
"status": "UNKNOWN",
"name": "<string>",
"description": "<string>",
"group": {
"id": 123,
"name": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"next_page": "<string>"
}X-API-KEY header:
X-API-KEY: your_api_key_here
const response = await fetch(
"https://app.chainpatrol.io/api/v2/organization/assets?type=URL&per_page=100",
{
method: "GET",
headers: {
"X-API-KEY": "YOUR_API_KEY_HERE",
},
}
);
const data = await response.json();
console.log(data.assets);
| Parameter | Type | Required | Description |
|---|---|---|---|
| type | string | No | Filter by asset type: URL, ADDRESS, PAGE, DISCORD, TELEGRAM, TWITTER, INSTAGRAM, MEDIUM, GITHUB, YOUTUBE, LINKEDIN, TWITCH, TIKTOK, EMAIL |
| groupId | number | No | Filter by group ID. Use -1 for ungrouped assets only. Omit to include all assets regardless of group assignment. |
| query | string | No | Search query to filter assets by content. Performs a case-insensitive search across asset content, name, and description fields. |
| per_page | number | No | Number of assets to return per page. Valid range: 1-1000. Default: 100. Use larger values for bulk operations and smaller values for responsive UI pagination. |
| next_page | string | No | Cursor token for fetching the next page of results. This value is returned in the response when more results are available. Pass it in subsequent requests to continue pagination. |
{
"assets": [
{
"id": 12345,
"content": "https://example.com",
"type": "URL",
"status": "ALLOWED",
"name": "Main Website",
"description": "Our official website",
"group": {
"id": 1,
"name": "URLs"
},
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
{
"id": 12346,
"content": "0x1234567890abcdef1234567890abcdef12345678",
"type": "ADDRESS",
"status": "ALLOWED",
"name": "Treasury Wallet",
"description": null,
"group": null,
"createdAt": "2024-01-15T11:00:00.000Z",
"updatedAt": "2024-01-15T11:00:00.000Z"
}
],
"next_page": "12347"
}
| Field | Type | Description |
|---|---|---|
| assets | array | Array of asset objects belonging to your organization |
| assets[].id | number | Unique identifier for the asset |
| assets[].content | string | The actual asset content (URL, address, handle, etc.) |
| assets[].type | string | Asset type classification |
| assets[].status | string | Asset status, typically ALLOWED for organization assets |
| assets[].name | string | Display name for the asset (optional) |
| assets[].description | string | Description of the asset (optional, can be null) |
| assets[].group | object | Group object containing id and name if asset is assigned to a group, null if ungrouped |
| assets[].createdAt | string | ISO 8601 timestamp when the asset was created |
| assets[].updatedAt | string | ISO 8601 timestamp when the asset was last updated |
| next_page | string | Cursor token for the next page of results. Undefined/null when no more results are available. |
next_page cursor returned in each response:
async function fetchAllAssets() {
let allAssets = [];
let nextPage: string | undefined = undefined;
while (true) {
const params = new URLSearchParams({
per_page: "500",
...(nextPage && { next_page: nextPage }),
});
const response = await fetch(
`https://app.chainpatrol.io/api/v2/organization/assets?${params}`,
{
method: "GET",
headers: {
"X-API-KEY": "YOUR_API_KEY_HERE",
},
}
);
const data = await response.json();
allAssets = allAssets.concat(data.assets);
nextPage = data.next_page;
if (!nextPage) {
break;
}
}
return allAssets;
}
fetchAllAssets()
.then((assets) => console.log(`Total assets: ${assets.length}`))
.catch((error) => console.error("Error:", error));
curl -X GET 'https://app.chainpatrol.io/api/v2/organization/assets?type=URL' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
curl -X GET 'https://app.chainpatrol.io/api/v2/organization/assets?groupId=1' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
curl -X GET 'https://app.chainpatrol.io/api/v2/organization/assets?groupId=-1' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
curl -X GET 'https://app.chainpatrol.io/api/v2/organization/assets?query=wallet' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
curl -X GET 'https://app.chainpatrol.io/api/v2/organization/assets?type=URL&groupId=1&query=main' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'
{
"error": {
"code": "UNAUTHORIZED",
"message": "API key with organization access required"
}
}
{
"error": {
"code": "BAD_REQUEST",
"message": "Invalid asset type provided"
}
}
per_page=500 or higher for bulk operations to minimize API callsper_page=50-100 for UI pagination for responsive user experiencenext_page in the response to determine if more results existquery parameter for user-driven search featuresper_page values based on your use casestatus for organization assets is typically ALLOWEDgroup field is null when an asset is not assigned to any groupnext_page cursor is opaque and should not be parsed or modifiedYour API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.
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, IPFS, GOOGLE_FORM, WHATSAPP, DISCORD_USER, QUORA, GITHUB, TEACHABLE, SUBSTACK, DEBANK, TAWK_TO, JOTFORM, PRIMAL, BLUESKY, SNAPCHAT, DESO, PINTEREST, FLICKR, GALXE, VELOG, NPM, PYPI, HEX, DOCKER_HUB, VOCAL_MEDIA, TECKFINE, TENDERLY, HACKMD, ETSY, ZAZZLE, BASENAME, BILIBILI_TV, VIMEO, DAILYMOTION, PHONE_NUMBER, SLACK, CALENDLY, NGROK, RARIBLE, RUST_PACKAGE, FLATHUB, VIDLII, VEVIOZ, ISSUU, SOUNDCLOUD, ZAPPER The number of assets to return per page (max 1000)
1 <= x <= 1000Cursor for fetching the next page of results
Was this page helpful?