API referenceGET
Preview keyword billing
Preview the plan and monthly price for a desired number of active keywords. Read-only: the API never changes the plan or charges.
GET
https://ai.redreplier.com/ai-app/api/v1/keywords/billing-previewPreview the plan and monthly price for a desired number of active keywords. Read-only: the API never changes the plan or charges.
Bearer Token (RedReplier API token)
Parameters
desiredKeywordCount(query, integer, required, min 0): Desired total active keyword count.
Request body
This endpoint does not require a JSON body.
Response
Returns a keyword billing preview.
currentPlanName(string | null): Current plan name, ornullwhen none is active.currentMonthlyPrice(number): Current monthly price.targetPlanName(string | null): Plan needed for the requested keyword count, ornullwhen no change is needed.targetMonthlyPrice(number): Monthly price after the change.immediateCharge(number): Prorated immediate charge for the current billing period.targetKeywords(number): Target active keyword count.isUpgrade, isDowngrade, requiresImmediatePayment(boolean): Billing change flags.
Notes
Read-only: the API never changes the subscription. Plan changes happen in the RedReplier app.
Errors
400 Bad Request: Invalid input, URL, UUID, enum, query parameter, or body.401 Unauthorized: Missing or invalid Bearer token, orcode: "token_issuer_lost_access"when the person who created the API key was deactivated or left the workspace.403 Forbidden:code: "subscription_required"when the workspace plan does not include API access,code: "workspace_access_denied"whenX-Workspace-Idnames a workspace this credential cannot reach, orcode: "permission_denied"when your role in the workspace does not holdredreplier.write(Admin and Editor hold it).404 Not Found: The resource does not exist for the token account.429 Too Many Requests: Rate limit exceeded. Wait the seconds inRetry-After.500 Internal Server Error: Unexpected server error.
Example request (curl)
curl --request GET \
--url https://ai.redreplier.com/ai-app/api/v1/keywords/billing-preview?desiredKeywordCount=25 \
--header 'Authorization: Bearer redreplier_test_1234567890'200
{
"currentPlanName": "Starter",
"currentMonthlyPrice": 49,
"targetPlanName": "Growth",
"targetMonthlyPrice": 99,
"immediateCharge": 18.42,
"targetKeywords": 25,
"isUpgrade": true,
"isDowngrade": false,
"requiresImmediatePayment": true
}