Skip to content

Update account billing preferences

PATCH
/account
curl --request PATCH \
--url https://api.pingram.io/account \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "autoUpgrade": true }'

Authorizations

Request Bodyrequired

Media typeapplication/json

PATCH /account request: billing preferences.

object
autoUpgrade
boolean
Examplegenerated
{
"autoUpgrade": true
}

Responses

200

Successful response

Media typeapplication/json

GET /account response: public plan fields for the authenticated account.

object
accountId
required
string
accountType
required
string
Allowed values: free paid
creator
string
name
string
messagesCap
required
number
costCap
required
number
smsCap
number
callCap
number
billingVersion

When omitted, defaults to LATEST_BILLING_VERSION.

number
Allowed values: 1 3
anniversaryDate
required

ISO date (YYYY-MM-DD) when the billing cycle resets.

string
createdAt
required
string
updatedAt
required
string
status
string
Allowed values: verified unverified blocked
subscriptionStatus
string
nullable
Allowed values: active canceled past_due paused
pendingDowngradeEffectiveDate
string
pendingDowngradeCostCap
number
pendingDowngradeAccountType
string
Allowed values: free
autoUpgrade

When true, paid v3 accounts move up one budget tier at 90% of costCap.

boolean
Example
{
"accountType": "free",
"billingVersion": 1,
"status": "verified",
"subscriptionStatus": "active",
"pendingDowngradeAccountType": "free"
}

400

Bad Request - validation errors, invalid input

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

401

Unauthorized

402

Payment Required - usage limits exceeded

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

500

Internal Server Error

502

Bad Gateway - provider error

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}