Skip to main content
POST
/
platform
/
{storeUrl}
/
actions
/
update-asset
Update an advertising asset
curl --request POST \
  --url https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/update-asset \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "assetId": "<string>",
  "updates": {
    "name": "<string>",
    "budget": 123
  }
}
'
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({assetId: '<string>', updates: {name: '<string>', budget: 123}})
};

fetch('https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/update-asset', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://app.bily.ai/api/customer/v1/platform/{storeUrl}/actions/update-asset"

payload = {
"assetId": "<string>",
"updates": {
"name": "<string>",
"budget": 123
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "ok": true,
  "result": {},
  "asset": {
    "key": "<string>",
    "platform": "<string>",
    "adAccountId": "<string>",
    "assetId": "<string>",
    "name": "<string>",
    "supportedWrites": [],
    "parentAssetId": "<string>",
    "status": "<string>",
    "effectiveStatus": "<string>",
    "dailyBudget": 123,
    "lifetimeBudget": 123,
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "results": [
    {}
  ]
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}
{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}

Authorizations

x-api-key
string
header
required

A server-side Bily API key created under Settings > MCP > Access key fallback. Select the intended store before creating it.

Headers

x-bily-organization-id
string

An organization ID returned by GET /context or GET /organizations. Required for GET /stores and optional for store-scoped paths.

Example:

"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"

Path Parameters

storeUrl
string
required

The exact store URL returned by GET /context or GET /stores.

Example:

"store.example.com"

Body

application/json
assetType
enum<string>
required
Available options:
campaign,
adset,
ad
assetId
string
required
updates
object
required
platform
enum<string>
Available options:
FACEBOOK,
GOOGLE_ADS,
MICROSOFT,
LINKEDIN,
SNAPCHAT,
TIKTOK,
PINTEREST
adAccountId
string

Response

Request completed successfully.

ok
boolean
required
result
object
asset
object
results
object[]