API reference
Plan and billing
The plan is the owner's Gemlead plan, shared by all their X accounts, as on the app's Plans page. Read it before you answer a question about billing, then get the Stripe link the owner opens to subscribe, change the plan or buy credits.
Nothing is paid through the API. A checkout and the billing page are Stripe links the owner opens and pays on. Auto-recharge is the one change that charges later on its own, with the saved card, so ask the owner first.
Only the owner of the X account manages the plan, a team member's key gets forbidden.
The plan object
The owner's Gemlead plan, as the app's Plans page shows it, with its credits, its auto-recharge, the free trial and the prices. It covers all the owner's X accounts.
Attributes
- objectstringAlways
plan. - planstringThe owner's plan.
freestarterbusinessenterprise - billing_periodstring or nullHow the plan is billed,
nullwithout a paid plan.monthlyquarterlyannually - statusstringWhere the subscription stands.
trialing,active,past_dueor another Stripe status while subscribed,pausedwhile its payments are paused,managedfor a plan Gemlead's team set up without a Stripe subscription,freeorcanceledwithout one. - subscribedbooleanWhether the owner has a Stripe subscription.
- cancel_at_period_endboolean
truewhen the plan ends at the end of the period it is in. - renews_atstring or nullWhen the plan renews, ISO 8601.
nullwhen it ends or there is no subscription. - ends_atstring or nullWhen a cancelled plan ends, ISO 8601.
- payment_holdboolean
truewhen the plan ended for a failed payment. Campaigns, scoring and scraping wait for a new subscription. - notestringOnly when
statusismanaged. It says who changes the plan. - x_accountsintegerHow many X accounts the plan includes.
- creditsobjectThe owner's credits, shared by all their X accounts.
- trialobjectThe free trial a first checkout starts with. One per owner.
- next_payment_discount_percentinteger or null20 when the affiliate review post's discount waits on the next payment, else
null. See Draft the review post. - plansarray of objectsThe plans and their prices in US dollars, each with
plan,price_per_monthby billing period,currency,credits_per_monthandx_accounts. Enterprise has no price and anote, it is booked on a call from the app's chat. - credit_packsarray of objectsThe credit packs on sale, each with its
id, itscredits, itsamountand itscurrency. Credits bought never expire. - canobjectWhat the owner can do now.
- manage_urlstringThe app's Plans page.
{
"object": "plan",
"plan": "business",
"billing_period": "monthly",
"status": "active",
"subscribed": true,
"cancel_at_period_end": false,
"renews_at": "2026-12-14T09:21:05.000Z",
"ends_at": null,
"payment_hold": false,
"x_accounts": 4,
"credits": {
"balance": 84250,
"per_month": 150000,
"low": false,
"auto_recharge_pack": "medium",
"auto_recharge_below": 1000,
"auto_recharge_failures": 0,
"has_saved_card": true
},
"trial": {
"available": false,
"days": 0,
"code": null
},
"next_payment_discount_percent": null,
"plans": [
{
"plan": "starter",
"price_per_month": {
"monthly": 99,
"quarterly": 89,
"annually": 79
},
"currency": "usd",
"credits_per_month": 50000,
"x_accounts": 1
},
{
"plan": "business",
"price_per_month": {
"monthly": 229,
"quarterly": 206,
"annually": 183
},
"currency": "usd",
"credits_per_month": 150000,
"x_accounts": 4
},
{
"plan": "enterprise",
"price_per_month": null,
"currency": "usd",
"note": "Priced per client: booked on a call with Gemlead's team, from the app's chat."
}
],
"credit_packs": [
{
"id": "mini",
"credits": 5000,
"amount": 19,
"currency": "usd"
},
{
"id": "small",
"credits": 15000,
"amount": 49,
"currency": "usd"
},
{
"id": "medium",
"credits": 35000,
"amount": 99,
"currency": "usd"
},
{
"id": "large",
"credits": 80000,
"amount": 199,
"currency": "usd"
},
{
"id": "xl",
"credits": 200000,
"amount": 399,
"currency": "usd"
},
{
"id": "xxl",
"credits": 500000,
"amount": 849,
"currency": "usd"
}
],
"can": {
"checkout": false,
"change_on_billing_portal": true,
"buy_credits": true,
"auto_recharge": true,
"billing_portal": true
},
"manage_url": "https://gemlead.ai/app/plans"
}Retrieve the plan
Returns the owner's plan, its billing period and status, the credits, auto-recharge, the free trial, and the prices of the plans and the credit packs.
Returns
The plan object.
Errors
- 403forbiddenThe key belongs to a team member. Only the owner of the X account can do this.
curl https://gemlead.ai/api/v1/plan \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "plan",
"plan": "business",
"billing_period": "monthly",
"status": "active",
"subscribed": true,
"cancel_at_period_end": false,
"renews_at": "2026-12-14T09:21:05.000Z",
"ends_at": null,
"payment_hold": false,
"x_accounts": 4,
"credits": {
"balance": 84250,
"per_month": 150000,
"low": false,
"auto_recharge_pack": "medium",
"auto_recharge_below": 1000,
"auto_recharge_failures": 0,
"has_saved_card": true
},
"trial": {
"available": false,
"days": 0,
"code": null
},
"next_payment_discount_percent": null,
"plans": [
{
"plan": "starter",
"price_per_month": {
"monthly": 99,
"quarterly": 89,
"annually": 79
},
"currency": "usd",
"credits_per_month": 50000,
"x_accounts": 1
},
{
"plan": "business",
"price_per_month": {
"monthly": 229,
"quarterly": 206,
"annually": 183
},
"currency": "usd",
"credits_per_month": 150000,
"x_accounts": 4
},
{
"plan": "enterprise",
"price_per_month": null,
"currency": "usd",
"note": "Priced per client: booked on a call with Gemlead's team, from the app's chat."
}
],
"credit_packs": [
{
"id": "mini",
"credits": 5000,
"amount": 19,
"currency": "usd"
},
{
"id": "small",
"credits": 15000,
"amount": 49,
"currency": "usd"
},
{
"id": "medium",
"credits": 35000,
"amount": 99,
"currency": "usd"
},
{
"id": "large",
"credits": 80000,
"amount": 199,
"currency": "usd"
},
{
"id": "xl",
"credits": 200000,
"amount": 399,
"currency": "usd"
},
{
"id": "xxl",
"credits": 500000,
"amount": 849,
"currency": "usd"
}
],
"can": {
"checkout": false,
"change_on_billing_portal": true,
"buy_credits": true,
"auto_recharge": true,
"billing_portal": true
},
"manage_url": "https://gemlead.ai/app/plans"
}Open the billing portal
Returns a link to Stripe's billing page, the app's Manage subscription, to change or cancel the plan, change the card or see the invoices. An Idempotency-Key is ignored here, so a retry gets a fresh link.
Returns
An object with object at billing_portal, the Stripe url and a message.
Errors
- 409no_billingStripe does not know the owner yet. Subscribe to a plan first.
- 403forbiddenThe key belongs to a team member. Only the owner of the X account can do this.
- Stripe did not answer. Nothing changed, try again in a minute.
curl -X POST https://gemlead.ai/api/v1/plan/billing_portal \
-H "Authorization: Bearer $GEMLEAD_API_KEY"{
"object": "billing_portal",
"url": "https://billing.stripe.com/p/session/live_YWNjdF8xUTJ3ZXJ0eTEyMw",
"message": "Open this Stripe page to change or cancel the plan, the card or see the invoices."
}Buy credits
Returns Stripe's payment page for a credit pack, as Get credits on the Plans page. The credits are added once it is paid and never expire. Paid plans only. An Idempotency-Key is ignored here, so a retry gets a fresh link.
Body parameters
- packstringRequiredThe credit pack, as
credit_packslists them.minismallmediumlargexlxxl
Returns
An object with object at credits_checkout, the Stripe url, the pack, its credits and a message.
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept.
paramnames it. - The owner has no paid plan. Credit packs come with the plans.
- 403forbiddenThe key belongs to a team member. Only the owner of the X account can do this.
- Stripe did not answer. Nothing changed, try again in a minute.
curl -X POST https://gemlead.ai/api/v1/plan/credits_checkout \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pack": "medium"
}'{
"object": "credits_checkout",
"url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0",
"pack": "medium",
"credits": 35000,
"message": "Open this Stripe page to pay for 35000 credits. They are added once it is paid, and never expire."
}Set auto-recharge
Turns auto-recharge on with a pack, or off. When the balance falls to 1000 credits or fewer, the saved card pays for the pack on its own, so ask the owner first. Turning it on needs a paid plan.
Body parameters
- packstringRequiredThe pack to buy again, or
off.minismallmediumlargexlxxloff
Returns
An object with object at auto_recharge, the pack or null, the balance it buys below and a message.
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept.
paramnames it. - Turning it on without a paid plan.
- 403forbiddenThe key belongs to a team member. Only the owner of the X account can do this.
curl -X PATCH https://gemlead.ai/api/v1/plan/auto_recharge \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pack": "medium"
}'{
"object": "auto_recharge",
"pack": "medium",
"below": 1000,
"message": "Auto-recharge on 35000 credits: the saved card pays for this pack ($99) whenever the balance is at 1000 credits or less."
}Apply a trial code
Applies a personal trial code, like one handed in a DM. The next checkout starts with its free trial. For owners who never had a subscription.
Body parameters
- codestringRequiredThe trial code, up to 40 characters. Letters and digits, case and spaces do not matter.
Returns
An object with object at trial_code, the code, its trial_days and a message.
Errors
- A required parameter is missing.
paramnames it. - The code is not valid or was used already.
- The owner already had a subscription. The trial is for new accounts only.
- 403forbiddenThe key belongs to a team member. Only the owner of the X account can do this.
curl -X POST https://gemlead.ai/api/v1/plan/trial_code \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "ALOK3"
}'{
"object": "trial_code",
"code": "ALOK3",
"trial_days": 7,
"message": "Applied: the next checkout (manage_plan checkout) starts with a 7-day free trial."
}The plan checkout object
A Stripe link for a plan. Nothing is paid until the owner pays on that page.
Attributes
- objectstringAlways
plan_checkout. - kindstring
checkoutfor Stripe's checkout without a paid plan,billing_portalonce subscribed, where the plan and its period change with proration.checkoutbilling_portal - urlstringThe Stripe page to open. It lasts a few minutes.
- planstringThe plan asked for.
starterbusiness - billing_periodstringThe billing period asked for.
monthlyquarterlyannually - trial_daysinteger or nullWith
checkout, the free trial's days before the first payment,nullwithout a trial. - priceobjectWith
checkout, what Stripe charges each period, itsamount, itscurrencyandevery_months. - current_planstringWith
billing_portal, the plan now. - current_billing_periodstring or nullWith
billing_portal, its billing period now. - messagestringWhat the link does, to show the owner.
{
"object": "plan_checkout",
"kind": "checkout",
"url": "https://checkout.stripe.com/c/pay/cs_live_a1B2c3D4e5F6g7H8i9J0",
"plan": "business",
"billing_period": "annually",
"trial_days": 3,
"price": {
"amount": 2196,
"currency": "usd",
"every_months": 12
},
"message": "Open this Stripe page to start Business, billed annually: a 3-day free trial, then $2196. The card is asked, nothing is charged until the trial ends."
}Start a plan checkout
Returns the link a plan card opens in the app. Without a paid plan it is Stripe's checkout, with the free trial when the owner can still have one. Once subscribed it is Stripe's billing page, where the plan and its period change with proration, so a second subscription is never made. Enterprise is booked on a call from the app's chat. An Idempotency-Key is ignored here, so a retry gets a fresh link.
Body parameters
- planstringRequiredThe plan.
starterbusiness - billing_periodstringMonthly, quarterly at 10 percent off or annually at 20 percent off. Defaults to the current period, else
monthly.monthlyquarterlyannually
Returns
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept.
paramnames it. - 409plan_managedGemlead's team set this plan up without a Stripe subscription, and changes it.
- 409no_billingStripe's billing page was needed and Stripe does not know the owner yet.
- 403forbiddenThe key belongs to a team member. Only the owner of the X account can do this.
- Stripe did not answer. Nothing changed, try again in a minute.
curl -X POST https://gemlead.ai/api/v1/plan/checkout \
-H "Authorization: Bearer $GEMLEAD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plan": "business",
"billing_period": "annually"
}'{
"object": "plan_checkout",
"kind": "billing_portal",
"url": "https://billing.stripe.com/p/session/live_YWNjdF8xUTJ3ZXJ0eTEyMw",
"plan": "business",
"billing_period": "annually",
"current_plan": "business",
"current_billing_period": "monthly",
"message": "Already subscribed: the plan and its billing period change on this Stripe page, prorated there. Nothing changes until it is confirmed there."
}