Usage Metering
Create customer billing
POST
/
api
/
v1
/
customer-billing
Copy
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>"
}'
Copy
{
"billing": {
"id": "<string>",
"totalCredits": "<string>",
"usedCredits": "<string>",
"allowOverages": true,
"spendCap": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
The created billing
The response is of type object
.
Copy
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>"
}'
Copy
{
"billing": {
"id": "<string>",
"totalCredits": "<string>",
"usedCredits": "<string>",
"allowOverages": true,
"spendCap": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
Assistant
Responses are generated using AI and may contain mistakes.