Update account billing preferences
const url = 'https://api.pingram.io/account';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"autoUpgrade":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pingram.io/account \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "autoUpgrade": true }'Authorizations
Request Bodyrequired
PATCH /account request: billing preferences.
object
Examplegenerated
{ "autoUpgrade": true}Responses
200
Successful response
GET /account response: public plan fields for the authenticated account.
object
When omitted, defaults to LATEST_BILLING_VERSION.
ISO date (YYYY-MM-DD) when the billing cycle resets.
When true, paid v3 accounts move up one budget tier at 90% of costCap.
Example
{ "accountType": "free", "billingVersion": 1, "status": "verified", "subscriptionStatus": "active", "pendingDowngradeAccountType": "free"}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}