Replace the agent budgets
Replace the full set of budgets for the agent. The request describes the complete desired state, so any budget left out is removed, and an empty budgets array clears every budget and returns the agent to unlimited usage. To change an existing budget, pass back the budget_id that was returned for it; the budget is updated in place and keeps its id. Omit budget_id to add a new budget and have an id assigned.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
The ID of the entity that owns the agent - the Business Manager ID
Meta Business Agent API version
The complete set of budgets for the agent
The budgets configured for the agent after the update
The budgets configured for the agent
Bad request
Unauthorized
Forbidden
Not found
Too many requests
Server error
POST /agent_budget/{entity_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 107
{
"budgets": [
{
"budget_id": "1234567890",
"max_budget": 100000,
"time_window": "seven_days",
"unit_type": "token"
}
]
}{
"budgets": [
{
"budget_id": "1234567890",
"max_budget": 100000,
"time_window": "seven_days",
"unit_type": "token"
}
]
}Last updated
Was this helpful?