Skip to content

Commit 2afad89

Browse files
add get credits API documenation
1 parent 6c57ee6 commit 2afad89

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

‎docs/docs/API-docs/v1.1/opensign.yaml‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,56 @@ paths:
8787
$ref: '#/components/schemas/invalidtoken'
8888
security:
8989
- x-api-token: []
90+
/getcredits:
91+
get:
92+
tags:
93+
- User
94+
summary: Get your API credits
95+
description: |
96+
The Get Credits API returns details about the credits available to your account:
97+
98+
**plan_credits:** Credits included with your subscription plan. These reset at the start of each new billing cycle.
99+
Example: If your plan provides 100 credits per month and you end
100+
the cycle with 50 remaining, your balance resets to 100 at the
101+
start of the next cycle.
102+
103+
**addon_credits:** Credits purchased separately from Settings → API Token → Buy Premium Credits. Add-on credits do not expire and are only used once all plan credits are consumed.
104+
105+
**total_credits:** The sum of **plan_credits** and **addon_credits**. This represents the total credits currently available for use.
106+
107+
operationId: getUcredits
108+
responses:
109+
"200":
110+
description: Successful operation
111+
content:
112+
application/json:
113+
schema:
114+
$ref: '#/components/schemas/credits_res'
115+
"400":
116+
description: Subscription not found
117+
content:
118+
application/json:
119+
schema:
120+
type: object
121+
properties:
122+
error:
123+
type: string
124+
example: Subscription not found!
125+
126+
"404":
127+
description: User not found!
128+
content:
129+
application/json:
130+
schema:
131+
$ref: '#/components/schemas/inline_response_404'
132+
"405":
133+
description: Invalid API Token!
134+
content:
135+
application/json:
136+
schema:
137+
$ref: '#/components/schemas/invalidtoken'
138+
security:
139+
- x-api-token: []
90140
/createcontact:
91141
post:
92142
tags:
@@ -5444,6 +5494,18 @@ components:
54445494
fontsize:
54455495
type: number
54465496
example: 12
5497+
credits_res:
5498+
type: object
5499+
properties:
5500+
plan_credits:
5501+
type: number
5502+
example: 0
5503+
addon_credits:
5504+
type: number
5505+
example: 0
5506+
total_credits:
5507+
type: number
5508+
example: 0
54475509
securitySchemes:
54485510
x-api-token:
54495511
type: apiKey

0 commit comments

Comments
 (0)