Overview
POST
/usage/usage-countersusageCreate usage_counters
Create a record in usage-counters.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- scopestring
- principalIdstring
- periodStartstring
- requestsinteger
- bytesinteger
Example
{
"scope": "string",
"principalId": "string",
"periodStart": "string",
"requests": 0,
"bytes": 0
}Responses
201
usage_counters
- scopestring
- principalIdstring
- periodStartstring
- requestsinteger
- bytesinteger
- updatedAtstring
Example
{
"scope": "string",
"principalId": "string",
"periodStart": "string",
"requests": 0,
"bytes": 0,
"updatedAt": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/usage/usage-counters" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scope": "string",
"principalId": "string",
"periodStart": "string",
"requests": 0,
"bytes": 0
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/usage/usage-counters", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"scope\": \"string\",\n \"principalId\": \"string\",\n \"periodStart\": \"string\",\n \"requests\": 0,\n \"bytes\": 0\n}",
});
const data = await res.json();