Skip to main content
POST
/
v2
/
budgets
cURL
curl --request POST \
  --url https://api.orq.ai/v2/budgets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "contact",
  "entity_id": "user_123",
  "period": "monthly",
  "amount": 250
}'
{
  "_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "workspace_id": "550e8400-e29b-41d4-a716-446655440000",
  "type": "contact",
  "contact_id": "user_123",
  "budget": {
    "period": "monthly",
    "amount": 250
  },
  "is_active": true,
  "consumption": {
    "current_amount": 125.5,
    "remaining_amount": 124.5,
    "period_start": "2024-01-01T00:00:00Z",
    "period_end": "2024-01-31T23:59:59Z"
  },
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
  • Contact Budget
  • Workspace Budget

Create budget configuration for contact or workspace Budget configuration for a specific contact

type
enum<string>
required

Contact budget type

Available options:
contact
Example:

"contact"

entity_id
string
required

Contact external ID

Example:

"user_123"

period
enum<string>
required

Budget period type

Available options:
daily,
weekly,
monthly,
yearly
Example:

"monthly"

amount
number
required

Budget amount in USD for the specified period

Required range: x >= 0
Example:

250

Response

Budget configuration created successfully

Budget configuration details

_id
string<ulid>
required

Unique ULID for the budget configuration

Example:

"01ARZ3NDEKTSV4RRFFQ69G5FAV"

workspace_id
string<uuid>
required

Workspace identifier that owns this budget configuration

Example:

"550e8400-e29b-41d4-a716-446655440000"

type
enum<string>
required

Budget entity type

Available options:
api_key,
contact,
workspace
Example:

"contact"

budget
object
required

Budget configuration

is_active
boolean
required

Whether this budget configuration is currently active

Example:

true

contact_id
string

Contact external identifier (present when type is "contact")

Example:

"user_123"

consumption
object
created
default:2025-10-30T20:19:20.950Z

The date and time the resource was created

updated
default:2025-10-30T20:19:20.950Z

The date and time the resource was last updated