docs(credit-usage-api): add new endpoint documentation for credit usage

This commit is contained in:
RutamBhagat 2024-12-21 06:24:53 -08:00
parent 818f5544cb
commit ca2d3dc6d2

View File

@ -719,7 +719,89 @@
}
}
}
},
"/credit-usage": {
"get": {
"summary": "Get remaining credits for the authenticated team",
"operationId": "getCreditUsage",
"tags": [
"Billing"
],
"security": [
{
"bearerAuth": []
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
},
"data": {
"type": "object",
"properties": {
"remaining_credits": {
"type": "number",
"description": "Number of credits remaining for the team",
"example": 1000
}
}
}
}
}
}
}
},
"404": {
"description": "Credit usage information not found",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": false
},
"error": {
"type": "string",
"example": "Could not find credit usage information"
}
}
}
}
}
},
"500": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": false
},
"error": {
"type": "string",
"example": "Internal server error while fetching credit usage"
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {