For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

post
Authorizations
D360-API-KEYstringRequired

API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.

Path parameters
entity_idintegerRequired

The ID of the entity that owns the agent - the Business Manager ID

Header parameters
X-API-Versionstring · enumOptional

Meta Business Agent API version

Possible values:
Body

The complete set of budgets for the agent

Responses
200

The budgets configured for the agent after the update

application/json

The budgets configured for the agent

post/agent_budget/{entity_id}
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?