Skip to content

Get credits and rate limits

GET
/v2/usage
curl --request GET \
--url https://api.surveycoder.io/v2/usage \
--header 'x-api-key: <x-api-key>'

Returns the current credit balance, plan info, and per-key rate limit configuration for the authenticated organization.

Usage information

Media type application/json
object
success
required
boolean
data
required

Organization credit balance and limits.

object
plan
required

Current subscription plan. Note: professional is displayed as “Business” in the UI.

string
Allowed values: starter growth professional enterprise
credits_remaining
required

Total available credits (base + rollover). Credits never expire.

integer
credits_monthly
required

Monthly credit allocation for this plan.

integer
is_trial
required

Whether the organization is on a free trial.

boolean
rate_limit
required

Rate limit configuration for the current plan.

object
rpm
required

Maximum API requests per minute.

integer
concurrent_jobs
required

Maximum concurrent async jobs allowed.

integer
meta
required
object
api_version
string
Example
{
"success": true,
"data": {
"plan": "starter",
"credits_remaining": 2450,
"credits_monthly": 3000,
"is_trial": false,
"rate_limit": {
"rpm": 30,
"concurrent_jobs": 3
}
},
"meta": {
"api_version": "v1"
}
}

Missing or invalid API key.

Media type application/json

Standard error envelope.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code. See the error reference for the full list.

string
message
required

Human-readable explanation of what went wrong.

string
request_id

Echo of the X-Request-Id header, when provided.

string format: uuid
doc_url

Link to documentation for this specific error code.

string format: uri
Example
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "x-api-key header is required",
"doc_url": "https://docs.surveycoder.io/errors/unauthorized"
}
}

Resource not found.

Media type application/json

Standard error envelope.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code. See the error reference for the full list.

string
message
required

Human-readable explanation of what went wrong.

string
request_id

Echo of the X-Request-Id header, when provided.

string format: uuid
doc_url

Link to documentation for this specific error code.

string format: uri
Example
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Project not found",
"doc_url": "https://docs.surveycoder.io/errors/not-found"
}
}