Skip to content

Get asset ID

GET /api/v1/external/public/assets

An asset represents a website or application registered in truConsent (e.g. “Main Website” or “iOS App”). You need its id — the assetId — to mount the consent banner and to query collection points.

Use your admin-scope API key and organization ID from the Platform Setup steps. Run this from your development machine or a secure backend.


Terminal window
curl -X GET "https://truapi-dev.truconsent.io/api/v1/external/public/assets" \
-H "X-API-Key: $ADMIN_API_KEY" \
-H "X-Org-Id: $ORGANIZATION_ID"

{
"data": [
{
"asset_type": "Web App",
"name": "Main Website",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"description": "Primary customer-facing web application"
},
{
"asset_type": "Mobile App",
"name": "iOS App",
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"description": "Production iOS application"
}
],
"count": 2
}

Copy the id of the asset that matches your integration target — this is your assetId.


Returns a list of all assets registered to your organization.

{
"data": [
{
"asset_type": "Web App",
"name": "Main Website",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"description": "Primary customer-facing web application"
},
{
"asset_type": "Mobile App",
"name": "iOS App",
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"description": "Production iOS application"
}
],
"count": 2
}
FieldDescription
idAsset UUID — use this as assetId in the SDK and collection point queries.
nameHuman-readable name set in the dashboard.
asset_typeOne of Web App, Mobile App, or API.
descriptionOptional description entered in the dashboard.
countTotal number of assets returned.

ASSET_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx