POST
/
api
/
v1
/
customer-billing
curl --request POST \
  --url https://prod.oneloop.ai/api/v1/customer-billing \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "totalCredits": "0",
  "allowOverages": false,
  "spendCap": "<string>",
  "externalMeterId": "<string>",
  "workspaceId": "<string>"
}'
{
  "billing": {
    "id": "<string>",
    "totalCredits": "<string>",
    "usedCredits": "<string>",
    "allowOverages": true,
    "spendCap": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
externalMeterId
string
required
workspaceId
string
required
totalCredits
string
default:0
allowOverages
boolean
default:false
spendCap
string

Response

200
application/json
The created billing
billing
object | null
required