GRGlobalRouter Docs
Console

Assets / POST

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 list

Request parameters

FieldTypeRequiredDescription
providerstringNoAsset provider is optional. Creation follows existing selection rules; specify a provider to select a particular route.
group_idstringConditionalGroup ID belonging to the selected provider; required on import.
source_urlstringYesAccessible asset URL.
asset_typestringYesAsset type: image, video, or audio.
namestringYesAsset name, 1 to 32 characters.

Request examples

Import asset 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

FieldTypeRequiredDescription
idstringYesAsset ID.

Response example

Response example
{
  "id": "asset_123"
}