curl --request POST \
--url https://app.bily.ai/api/customer/v1/platform/{resourceUrl}/actions/read-asset-budget \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"platform": "FACEBOOK",
"adAccountId": "act_123456789012345",
"sourceAuthority": {
"dataSourceAdAccountId": "source-account-example",
"dataSourceConnectorId": "connector-example"
},
"payload": {
"version": 1,
"assetType": "campaign",
"assetId": "234567890123456"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform: 'FACEBOOK',
adAccountId: 'act_123456789012345',
sourceAuthority: {
dataSourceAdAccountId: 'source-account-example',
dataSourceConnectorId: 'connector-example'
},
payload: {version: 1, assetType: 'campaign', assetId: '234567890123456'}
})
};
fetch('https://app.bily.ai/api/customer/v1/platform/{resourceUrl}/actions/read-asset-budget', 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/{resourceUrl}/actions/read-asset-budget"
payload = {
"platform": "FACEBOOK",
"adAccountId": "act_123456789012345",
"sourceAuthority": {
"dataSourceAdAccountId": "source-account-example",
"dataSourceConnectorId": "connector-example"
},
"payload": {
"version": 1,
"assetType": "campaign",
"assetId": "234567890123456"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"result": {
"version": 1,
"resourceUrl": "store.example.com",
"platform": "FACEBOOK",
"adAccountId": "act_123456789012345",
"sourceAuthority": {
"dataSourceAdAccountId": "source-account-example",
"dataSourceConnectorId": "connector-example"
},
"selection": {
"assetType": "campaign",
"assetId": "234567890123456"
},
"currency": "USD",
"canEdit": false,
"reason": "native_budget_unavailable",
"unitsPerCurrency": 100
}
}{
"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>"
}{
"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>"
}Read Exact Native Budget for Review
Read one exact Meta campaign or owned ad-set budget, or Google campaign budget, in native account currency and integer units. Version 1 returns a budgetGuard only for an eligible exact native owner. An inherited Meta ad-set budget requires selecting its campaign; Bily never retargets the selected row. Google supports STANDARD DAILY amount_micros and verifies the complete affected set of at most 100 campaigns, including explicitly shared budgets with one actual user. Missing/ambiguous owners, incomplete shared scope and Google CUSTOM_PERIOD/other budget types are ineligible. Classic VIDEO and any shared budget with a non-removed VIDEO member are read only; missing or unknown native family proof is ineligible. Use the unchanged absolute approved amount plus this guard in a reviewed update-asset draft; changed amount, owner, currency, cadence or source requires a fresh review. Bily publications serialize the exact native budget owner across jobs and authorized sources; external platform changes can still race after the final read. The fresh reader reports bounded global coordination guidance without releasing or replaying unknown outcomes.
curl --request POST \
--url https://app.bily.ai/api/customer/v1/platform/{resourceUrl}/actions/read-asset-budget \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"platform": "FACEBOOK",
"adAccountId": "act_123456789012345",
"sourceAuthority": {
"dataSourceAdAccountId": "source-account-example",
"dataSourceConnectorId": "connector-example"
},
"payload": {
"version": 1,
"assetType": "campaign",
"assetId": "234567890123456"
}
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
platform: 'FACEBOOK',
adAccountId: 'act_123456789012345',
sourceAuthority: {
dataSourceAdAccountId: 'source-account-example',
dataSourceConnectorId: 'connector-example'
},
payload: {version: 1, assetType: 'campaign', assetId: '234567890123456'}
})
};
fetch('https://app.bily.ai/api/customer/v1/platform/{resourceUrl}/actions/read-asset-budget', 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/{resourceUrl}/actions/read-asset-budget"
payload = {
"platform": "FACEBOOK",
"adAccountId": "act_123456789012345",
"sourceAuthority": {
"dataSourceAdAccountId": "source-account-example",
"dataSourceConnectorId": "connector-example"
},
"payload": {
"version": 1,
"assetType": "campaign",
"assetId": "234567890123456"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"ok": true,
"result": {
"version": 1,
"resourceUrl": "store.example.com",
"platform": "FACEBOOK",
"adAccountId": "act_123456789012345",
"sourceAuthority": {
"dataSourceAdAccountId": "source-account-example",
"dataSourceConnectorId": "connector-example"
},
"selection": {
"assetType": "campaign",
"assetId": "234567890123456"
},
"currency": "USD",
"canEdit": false,
"reason": "native_budget_unavailable",
"unitsPerCurrency": 100
}
}{
"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>"
}{
"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
A server-side Bily API key created under Settings > AI tools > Access keys. Select the intended workspace before creating it.
Headers
An organization ID returned by GET /context or GET /organizations. Omit it when a scoped key supplies the organization. Otherwise provide it when no organization is selected.
"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"
Path Parameters
Exact workspace URL returned by GET /context.
Body
Response
Request completed. Inspect the returned state and any verification fields.