POST /data/projects/{project_id}/budgets

Create a budget for given production.

Path parameters

  • project_id string(uuid) Required

    Project unique identifier

application/json

Body Required

  • name string Required

    Budget name

  • currency string

    Budget currency code

    Default value is USD.

Responses

  • 201 application/json

    Budget created

    Hide response attributes Show response attributes object
    • id string(uuid)

      Budget unique identifier

    • name string

      Budget name

    • currency string

      Budget currency code

  • 400

    Invalid parameters

POST /data/projects/{project_id}/budgets
curl -X POST "http://api.example.com/data/projects/a24a6ea4-ce75-4665-a070-57453082c25/budgets" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "New Budget",
  "currency": "USD"
}'
import requests

url = "http://api.example.com/data/projects/a24a6ea4-ce75-4665-a070-57453082c25/budgets"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "name": "New Budget",
    "currency": "USD"
}

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

response.raise_for_status()

if response.content:
    print(response.json())
curl \
 --request POST 'http://api.example.com/data/projects/a24a6ea4-ce75-4665-a070-57453082c25/budgets' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"name":"New Budget","currency":"USD"}'
Request examples
{
  "name": "New Budget",
  "currency": "USD"
}
Response examples (201)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "name": "New Budget",
  "currency": "USD"
}