Skip to main content
POST
Add usage to a tenant

Authorizations

Authorization
string
header
required

An API key from your Devic console, sent as Authorization: Bearer <key>. An embedded front end sends a tenant-session token instead, so no API key reaches the browser, and an OAuth integration sends its access token. Missing, invalid or expired credentials get a 401. See Authentication.

Path Parameters

tenantId
string
required

tenantId

Body

application/json

At least one of tokens or cost must be greater than 0.

tokens
integer

Tokens to add. Rounded to an integer.

Required range: x >= 0
Example:

1500

cost
number

Cost to add, in the same unit as the tenant's cost limits.

Required range: x >= 0
Example:

0.42

source
string
default:external

Tag this injection is filed under, so usage can be broken down by origin.

Pattern: ^[a-z0-9_-]{1,40}$
Example:

"crm-sync"

reason
string

Free-text note for your own auditing. Not stored on the counters.

Response

Usage added

tenantId
string
source
string
applied
object
usage
object[]

Usage of every effective rule after the injection, so the remaining quota is visible in the same call. Each rule carries externalConsumption: the part of current that was injected rather than measured.