Charge credits
Credits
Charge credits
Charge credits for an authenticated user. Uses externalRef for idempotency to prevent double-charging. Third-party OAuth tokens require the CREDITS_WRITE scope.
POST
Charge credits
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Number of credits to charge
Required range:
x >= 1Example:
5
What the credits are being charged for
Available options:
SMS, CAL_AI_PHONE_CALL, AI_AGENT Example:
"AI_AGENT"
Unique external reference for idempotency
Example:
"agent-thread-123-1711432800000"
Response
200 - application/json
The response is of type object.