GET
/
quotas
Get workspace quotas and usage information
curl --request GET \
  --url https://api.captaindata.com/v1/quotas \
  --header 'X-API-Key: <api-key>'
{
"name": "Acme Corporation",
"uid": "123e4567-e89b-12d3-a456-426614174000",
"credits_left": 1250.5,
"credits_max": 2000,
"credits_used": 749.5,
"plan_name": "Gold",
"current_month_start": "2024-01-01T00:00:00Z",
"current_month_end": "2024-01-31T23:59:59Z"
}

Use Cases

  • Monitor API Usage: Track your credit consumption to avoid hitting limits and ensure uninterrupted service
  • Manage Billing: Monitor your billing cycle and plan details for better cost management
  • Optimize Performance: Analyze usage patterns to determine if you need to upgrade your plan

Authorizations

X-API-Key
string
header
required

API key required for authentication. Add your API key in the X-API-Key header.

Response

Successfully retrieved workspace quota information

Workspace quota and consumption information including credit usage and billing period details

uid
string<uuid>
required

Unique identifier for the workspace

Example:

"123e4567-e89b-12d3-a456-426614174000"

name
string
required

The name of the workspace (maximum 55 characters)

Maximum length: 55
Example:

"Acme Corporation"

credits_left
number
default:0
required

Number of API credits remaining in the current billing period

Required range: x >= 0
Example:

1250.5

credits_max
integer
default:0
required

Total number of API credits allocated for the current billing period

Required range: x >= 0
Example:

2000

credits_used
number
default:0
required

Number of API credits consumed in the current billing period

Required range: x >= 0
Example:

749.5

plan_name
string | null

Name of the current subscription plan

Example:

"Gold"

current_month_start
string<date-time> | null

Start date and time of the current billing period

Example:

"2024-01-01T00:00:00Z"

current_month_end
string<date-time> | null

End date and time of the current billing period

Example:

"2024-01-31T23:59:59Z"