Import asset
Import assets from an application URL.
POST /api/v1/assets
Provider is optional. Existing selection runs before checking whether group_id belongs to the selected provider; a mismatch is rejected. Specify the same provider for both group creation and import to guarantee the route.
Back to Assets endpoint listRequest parameters
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | No | Asset provider is optional. Creation follows existing selection rules; specify a provider to select a particular route. |
group_id | string | Conditional | Group ID belonging to the selected provider; required on import. |
source_url | string | Yes | Accessible asset URL. |
asset_type | string | Yes | Asset type: image, video, or audio. |
name | string | Yes | Asset name, 1 to 32 characters. |
Request examples
curl "https://api.globalrouter.com/api/v1/assets" \
-H "Authorization: Bearer $GR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"group_id": "ag_123",
"source_url": "https://example.com/product.png",
"asset_type": "image",
"name": "product-reference"
}'Response fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Asset ID. |
Response example
{
"id": "asset_123"
}