Get subscription credits

get/v1-beta/plan/credits

Returns the complete credit position of your subscription across all features and credit sources. Each feature and source pair appears at most once in the response, which includes the credit limit, the number of credits used, and the period over which the usage is counted, where applicable. Use this API to determine whether you have enough credits remaining for documents sent through the API, SMS, identity verification, KBA, or other billable features.

Note: Credit balances are refreshed every 2 minutes, so the most recent usage may not appear yet.

curl -X GET 'https://api.boldsign.com/v1-beta/plan/credits' \
-H 'accept: application/json' \
-H 'X-API-KEY: {your-api-key}'
ApiClient apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

PlanClient planClient = new PlanClient(apiClient);

var subscriptionCredits = planClient.GetSubscriptionCredits();

200 Success

{
  "environment": "Live",
  "credits": [
    {
      "feature": "WebApp",
      "source": "Plan",
      "isUnlimited": false,
      "limit": 100,
      "used": 42,
      "period": {
        "start": 1788220800,
        "end": 1790812799
      }
    },
    {
      "feature": "WebApp",
      "source": "Prepaid",
      "isUnlimited": false,
      "limit": 500,
      "used": 120
    },
    {
      "feature": "API",
      "source": "Plan",
      "isUnlimited": false,
      "limit": 500,
      "used": 87,
      "period": {
        "start": 1788220800,
        "end": 1790812799
      }
    },
    {
      "feature": "BulkDocument",
      "source": "OneTime",
      "isUnlimited": false,
      "limit": 50,
      "used": 5
    },
    {
      "feature": "SMS",
      "source": "PayAsYouGo",
      "isUnlimited": true,
      "used": 10,
      "period": {
        "start": 1788220800,
        "end": 1790812799
      }
    },
    {
      "feature": "Template",
      "source": "Plan",
      "isUnlimited": false,
      "limit": 25,
      "used": 12
    }
  ]
}
environmentstringRequiredThe environment of the API key used for the request. Possible values are Live and Test. The credits are the same in both environments.
creditsarray of objectsRequiredThe credit balances for all applicable features. Each feature and source pair appears at most once.
featurestringRequiredThe feature the credits are for. The possible values are listed under Features below. More values may be added in the future, so ignore any value you do not recognize.
sourcestringRequiredWhere the credits come from. The possible values are listed under Credit sources below. More values may be added in the future, so ignore any value you do not recognize.
isUnlimitedbooleanRequiredIndicates whether the credits are unlimited. When true, the limit property is omitted from the response. For PayAsYouGo credits, true means no usage limit has been set, and each use is still billed.
limitintegerThe total number of credits available for the feature and source. This property is omitted when the credits are unlimited.
usedintegerRequiredThe number of credits already used. This value is counted over the period when there is one, and it can exceed limit.
periodobjectThe window over which the used value is counted. The credits reset after end, which is inclusive. This property is omitted when the credits do not reset and remain valid until they are used (prepaid and one-time credits), and for template allowances that do not renew each billing period.
period.startintegerThe period start, in Unix epoch seconds (UTC).
period.endintegerThe period end, in Unix epoch seconds (UTC). This value is inclusive, meaning usage at this instant still counts toward the period.
ValueDescription
WebAppDocuments sent from the BoldSign web or mobile app, counted per document. Also includes documents sent through the Salesforce and HubSpot integrations, self-sign documents when the plan has no separate self-sign allowance, and bulk documents when the plan has no separate bulk document allowance.
APIDocuments sent through the API, counted per document.
BulkDocumentDocuments created by bulk send or bulk link, counted per document.
SMSSMS messages sent to signers, such as signing notifications and verification codes, counted per message.
IdVerificationIdentity verification, counted per verification attempt, whether it succeeds or fails.
KBAKnowledge-based authentication, counted per authentication attempt.
QESQualified electronic signature, counted per verification attempt.
WhatsAppWhatsApp messages sent to signers, counted per message.
TemplateTemplates, counted per template. If the allowance renews each billing period, only templates created in the current period count. Otherwise, all saved templates count.
SelfSignSelf-sign documents, counted per document. Returned only when the plan has a separate self-sign allowance; otherwise, self-sign documents count as WebApp.
ValueDescription
PlanThe allowance included in your plan for the current billing period.
PrepaidCredits purchased in advance, available for WebApp and API. They do not expire with the billing period.
OneTimeCredits granted once. They do not renew.
PayAsYouGoUsage billed per use, beyond or instead of the plan allowance.

The order in which credits are returned in the API response does not represent the order in which they are consumed. Credits are spent according to the following priority:

  1. One-time credits.
  2. Plan credits.
  3. Prepaid credits.
  4. Pay-as-you-go credits.

One-time credits are currently issued only for bulk documents, so the response does not include one-time WebApp or API credits.

This API has its own rate limit in addition to the account-wide rate limit. You can make up to 10 requests per minute for each subscription. The live and test environments are counted separately, so requests made in the test environment never use up the live environment's count.

The limit is counted in fixed one-minute windows aligned to the clock, and the count resets at the start of each window.

When you exceed the limit, the API returns a 429 Too Many Requests response. The response includes a Retry-After header with the number of seconds remaining until the current window ends and the count resets.

{
  "message": "You have reached the maximum number of requests allowed for this endpoint.",
  "details": "Maximum allowed: 10 requests per 1m. Please try again in 32 second(s)."
}

Note: Only the account admin can read the subscription credits. If an OAuth app is billed to its creator, calls made through the app on behalf of other organizations cannot read the credits.

Each error response includes an errorType that identifies the error and an error message that describes it.

The request was made by a user who is not the account admin.

{
  "errorType": "AdminOnly",
  "error": "Only the account admin can view the subscription credits."
}

The request was made through an OAuth app that is billed to its creator.

{
  "errorType": "OAuthAppCreatorBilled",
  "error": "This OAuth app is billed to its creator. Use the app creator's own credentials to view the subscription credits."
}

The plan details of the subscription could not be resolved.

{
  "errorType": "PlanDetailsNotFound",
  "error": "Plan details could not be resolved for this subscription."
}