curl -X POST "https://prospect-api.smartlead.ai/api/v1/search-email-leads/billing/topup" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: 6f1c2f8e-6a52-4d1b-9a0e-2c3d4e5f6a7b" \
-H "Content-Type: application/json" \
-d '{}'
{
"success": true,
"message": "Top-up successful.",
"data": {
"payment_intent_id": "pi_example",
"amount_paid_cents": 4900,
"credits_purchased": 1000,
"plan_credits_remaining": 250,
"topup_credits_remaining_after": 1000,
"expires_at": null
}
}
{
"success": false,
"message": "Send an Idempotency-Key header (for example a UUID) with every API top-up. Retrying with the same key never charges twice.",
"error": "idempotency_key_required"
}
{
"success": false,
"message": "A top-up with this Idempotency-Key is still in progress or its outcome is unknown. Retry with the same key in a minute to read its result; if this persists, check GET /billing/topup/history before using a new key.",
"error": "idempotency_key_in_progress"
}
Smart Prospect
Top Up Credits API
Buy Smart Prospect top-up credits with your saved card, safely retryable with an Idempotency-Key - POST /billing/topup
POST
/
api
/
v1
/
search-email-leads
/
billing
/
topup
curl -X POST "https://prospect-api.smartlead.ai/api/v1/search-email-leads/billing/topup" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: 6f1c2f8e-6a52-4d1b-9a0e-2c3d4e5f6a7b" \
-H "Content-Type: application/json" \
-d '{}'
{
"success": true,
"message": "Top-up successful.",
"data": {
"payment_intent_id": "pi_example",
"amount_paid_cents": 4900,
"credits_purchased": 1000,
"plan_credits_remaining": 250,
"topup_credits_remaining_after": 1000,
"expires_at": null
}
}
{
"success": false,
"message": "Send an Idempotency-Key header (for example a UUID) with every API top-up. Retrying with the same key never charges twice.",
"error": "idempotency_key_required"
}
{
"success": false,
"message": "A top-up with this Idempotency-Key is still in progress or its outcome is unknown. Retry with the same key in a minute to read its result; if this persists, check GET /billing/topup/history before using a new key.",
"error": "idempotency_key_in_progress"
}
Credit cost: Spends no Smart Prospect credits. It charges your saved card for a credit pack and adds those credits.
This endpoint requires your API key: pass it as the
api_key query parameter, or in an X-API-Key or Authorization: Bearer header (see Authentication).This call charges your saved card. With an API key you must send an
Idempotency-Key header, so a retry after a timeout never charges twice.Headers
A unique value per purchase, 1 to 255 visible ASCII characters. A UUID is the usual choice. Required for API-key callers.
- The same key from the same account within 24 hours returns the first response again (with the response header
Idempotent-Replayed: true) and does not charge again. - Every outcome is kept for the key, failures included, because a failed or timed-out charge may still have gone through. To try a new purchase after a failure, first check your top-up history, then use a new key.
Request Body
Send an empty JSON object ({}). No fields are accepted.
curl -X POST "https://prospect-api.smartlead.ai/api/v1/search-email-leads/billing/topup" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: 6f1c2f8e-6a52-4d1b-9a0e-2c3d4e5f6a7b" \
-H "Content-Type: application/json" \
-d '{}'
Response Fields
Idempotency errors
| Status | error | Meaning | What to do |
|---|---|---|---|
400 | idempotency_key_required | API-key call without an Idempotency-Key header | Send one (for example a UUID) |
400 | invalid_idempotency_key | The key is empty, longer than 255 characters, or has characters outside visible ASCII | Use a valid key |
409 | idempotency_key_in_progress | A top-up with this key is still running, or its outcome is unknown | Retry with the same key in a minute to read its result. If it persists, check your top-up history before using a new key |
503 | idempotency_unavailable | The key could not be checked. Nothing was charged | Retry with the same key |
error, and are replayed for the same key like any other outcome.
{
"success": true,
"message": "Top-up successful.",
"data": {
"payment_intent_id": "pi_example",
"amount_paid_cents": 4900,
"credits_purchased": 1000,
"plan_credits_remaining": 250,
"topup_credits_remaining_after": 1000,
"expires_at": null
}
}
{
"success": false,
"message": "Send an Idempotency-Key header (for example a UUID) with every API top-up. Retrying with the same key never charges twice.",
"error": "idempotency_key_required"
}
{
"success": false,
"message": "A top-up with this Idempotency-Key is still in progress or its outcome is unknown. Retry with the same key in a minute to read its result; if this persists, check GET /billing/topup/history before using a new key.",
"error": "idempotency_key_in_progress"
}
