Subscription and credits
Check your plan and how many credits you have left, for example before launching a big bulk search. This endpoint is free.
The response also contains your user id, also shown on the API page.
quotas.daily is not used anymore. It's still in the response for backward compatibility, but don't rely on it: use credits to know what you can spend.
https://app.icypeas.com/api/a/actions/subscription-informationRetrieve all the informations about your subscription and your credits.
AuthorizationstringrequiredYour API key, as is (no
Bearerprefix).Content-TypestringrequiredAlways
application/json.
emailstringrequiredThe email of the user you want to retrieve the subscription.
Rule: has to be an email
- cURL
- JavaScript
- Python
- PHP
- PowerShell
- JSON body
curl -X POST "https://app.icypeas.com/api/a/actions/subscription-information" \
-H "Content-Type: application/json" \
-H "Authorization: YOUR_API_KEY" \
-d '{
"email": "example@icypeas.com"
}'
const response = await fetch("https://app.icypeas.com/api/a/actions/subscription-information", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "YOUR_API_KEY",
},
body: JSON.stringify({
"email": "example@icypeas.com"
}),
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://app.icypeas.com/api/a/actions/subscription-information",
headers={"Authorization": "YOUR_API_KEY"},
json={
"email": "example@icypeas.com",
},
)
print(response.json())
<?php
$body = <<<'JSON'
{
"email": "example@icypeas.com"
}
JSON;
$ch = curl_init("https://app.icypeas.com/api/a/actions/subscription-information");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => $body,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Authorization: YOUR_API_KEY",
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
$headers = @{
"Authorization" = "YOUR_API_KEY"
"Content-Type" = "application/json"
}
$body = @'
{
"email": "example@icypeas.com"
}
'@
$response = Invoke-RestMethod -Method POST -Uri "https://app.icypeas.com/api/a/actions/subscription-information" -Headers $headers -Body $body
$response | ConvertTo-Json -Depth 10
Paste this in the Body field of Make, Zapier, n8n or Postman.
{
"email": "example@icypeas.com"
}
200SuccessResponse when your input is good.
{
"userId": "ax782432ezeze89087",
"customerId": "cus_NUigN0lSe4hOh9",
"currency": "eur",
"checkoutSession": "https://checkout.stripe.com/c/pay/cs_test_a1ekmO20jcbyBsDsNQjI5UUuM9VK4YIPgswGG9h7K6EQI9N7GENBcocA0z#fidkdWxOYHwnPyd1blpxYHZxWmNzZFBIfW5tfHJ1SE1VTE9cdEFDNWgycTU1R3BHM2tMPEQnKSdjd2poVmB3c2B3Jz9xd3BgKSdpZHxqcHFRfHVgJz8ndmxrYmlgWmxxYGgnKSdga2RnaWBVaWRmYG1qaWFgd3YnP3F3cGB4JSUl",
"lastInvoiceUrl": "",
"priceId": "price_1JPMUiIEPTjHbN3mQjFJqD46",
"plan": "Basic Plan",
"status": "paid",
"credits": 24,
"quotas": {
"daily": 1000
}
}
userIdstringIcypeas user ID
customerIdstringStripe user ID
statusstringStatus of the user's payment
creditsnumberNumber of credits
planstringName of the user's plan
priceIdstringID of the price the user subscribed to
lastInvoiceUrlstringURL for the user's last invoice
checkoutSessionstringStripe checkout session
currencystringChosen currency of the user. It is an empty string is the user has never had a plan
quotasobjectQuotas available in Icypeas
Show properties (1)
dailynumberdeprecatedDaily quota that was used by the SalesNav extractor.
Deprecated: Not used anymore. The value is still returned for backward compatibility but has no effect: ignore it.
200Validation errorResponse when there are validation errors
The request reached Icypeas but some fields are wrong. The response lists every problem in validationErrors. See how to read and fix errors.
{
"validationErrors": [
{
"expected": "email",
"type": "stringEmpty",
"actual": "",
"field": "email",
"message": "validation_string_empty"
}
],
"success": false
}
| Type | Fields | When it happens |
|---|---|---|
requiredvalidation_required | email | Error sent when the field is missing |
stringvalidation_string | email | Error sent when the field is not a string |
stringEmptyvalidation_string_empty | email | Error sent when the field is empty |
emailvalidation_email | email | Error sent when the field is not an email address |
401UnauthorizedResponse when we could not authenticate you.
{
"message": "Unauthorized access.",
"error": "UnauthorizedAccessError",
"status": 401,
"code": "unauthorized_access_error"
}
messagestringHuman-readable message.
errorstringError name
statusnumberHTTP error code
codestringError code
429Too many requestsError received when rate limit is exceeded
{
"message": "You have exceeded the max number of requests per minute.",
"error": "RateLimitExceededError",
"status": 429,
"code": "rate_limit_exceeded_error"
}
messagestringHuman-readable message.
errorstringError name
statusnumberHTTP error code
codestringError code