API Referencev1.0.0

Scravio API Documentation

Build high-quality email lists from social media platforms. Programmatically create campaigns, validate emails, export leads, and manage credits.

Base URLhttps://api.scravio.com/api
Get API Key

Authentication

All API requests require an API key passed in the X-API-Key header. Your key starts with sk_live_.

Create and manage your API keys in the API Keys dashboard.

curl https://api.scravio.com/api/auth/me \
  -H "X-API-Key: sk_live_your_api_key"

Error Responses

When an API request fails, the response body contains a standard error object:

Error Response
{
  "message": "Validation failed",
  "code": "VALIDATION_ERROR",
  "errors": [
    {
      "param": "inputs.hashtag",
      "msg": "Hashtag is required for INSTAGRAM_HASHTAG campaigns",
      "location": "body"
    }
  ],
  "requestId": "req_abc123"
}
StatusMeaning
400Bad Request — invalid parameters or request body
401Unauthorized — missing or invalid API key
403Forbidden — insufficient permissions
404Not Found — resource does not exist or does not belong to you
409Conflict — e.g. validation already running for this campaign
429Too Many Requests — rate limit exceeded
500Internal Server Error — unexpected failure, retry later

Rate Limits

Some endpoints have per-account or per-resource rate limits to ensure fair usage. When you exceed a rate limit, the API returns 429 Too Many Requests. Rate limits are noted in each endpoint's description.

EndpointLimit
POST /campaigns/{id}/stop5 requests/min per campaign
POST /campaigns/{id}/validate3 requests/min per campaign
POST /validation-jobs/text3 requests/hour
POST /list-exports5 requests/hour

API Overview

Account

Retrieve your account profile and credit balance.

GET/auth/me

Get current account

Returns the authenticated user's account profile including current credit balance, email verification status, and subscription plan limits (concurrentCampaignLimit, scrapingSpeed).

Responses

200Account profile
FieldTypeDescription
id
stringUser ID
email
string<email>Email address
name
stringDisplay name
avatar
stringnullableAvatar URL
isVerified
booleanWhether email is verified
shouldMaskEmail
booleanWhether emails are masked in lead responses
credits
numberCurrent credit balance
concurrentCampaignLimit
integerMax concurrent campaigns allowed by subscription
scrapingSpeed
stringScraping speed tier
slownormalfastultra_fast
createdAt
string<date-time>Account creation timestamp

Example

curl -X GET https://api.scravio.com/api/auth/me \
  -H "X-API-Key: sk_live_your_api_key"

Campaigns

Create and manage email scraping campaigns across 6 social platforms.

POST/campaigns/reserve-preview

Preview credit reservation

Returns the credit reservation estimate that should be reviewed before creating any supported campaign. Send the same type, inputs, targetEmails, maxCreditCap, and validation flags to POST /campaigns when launching. All new campaign previews use top-level targetEmails. The backend derives internal scan caps such as maxItemsToProcess and maxProfilesToScan. maxCreditCap is optional for all reserve-preview campaign types; when omitted, campaign creation defaults the cap to the recommended reservation. Use data.summary for customer-facing budget review UI.

Request Bodyrequired

application/json

FieldTypeDescription
typerequired
stringCampaign type to estimate.
INSTAGRAM_HASHTAGINSTAGRAM_USER_FOLLOWERSINSTAGRAM_USER_FOLLOWINGINSTAGRAM_POST_LIKERSINSTAGRAM_POST_COMMENTERSINSTAGRAM_PROFILE_LISTINSTAGRAM_KEYWORD_SEARCHYOUTUBE_KEYWORD_SEARCHYOUTUBE_CHANNEL_SEARCHFACEBOOK_KEYWORD_SEARCHLINKEDIN_KEYWORD_SEARCHTWITTER_KEYWORD_SEARCHTIKTOK_KEYWORD_SEARCHTIKTOK_SEARCH_USERSTIKTOK_USER_FOLLOWERSTIKTOK_USER_FOLLOWINGTIKTOK_POST_COMMENTERSX_KEYWORD_SEARCHX_FOLLOWERSX_FOLLOWINGX_RETWEETSX_REPLIERS
inputsrequired
objectType-specific campaign inputs. Use the same shape as POST /campaigns.
targetEmailsrequired
integerRequested number of unique email leads. Required for all new campaign previews.(11,000,000)
maxCreditCap
numberOptional hard stop cap for any reserve-preview campaign type, including Instagram. If omitted on creation, the reserved credits become the cap.
enableEmailValidation
booleanInclude email validation usage in the estimateDefault: false
enableDeepEmailSearch
booleanInclude automatic deep email search when supportedDefault: true for supported non-email-only types

Responses

200Reserve preview
FieldTypeDescription
success
booleanWhether preview generation succeeded
requestId
stringPreview request identifier
data
objectReserve preview data. Responses include a customer-facing summary plus targetEmails, internal scan caps such as emailCollectionGoal/maxItemsToProcess/maxProfilesToScan, maxCreditCap, estimatedCredits, estimatedUsageCredits, reserveUsageCredits, recommendedMaxCreditCap, targetMode, budgetMode, warnings, expectedCounters, reserveCounters, estimatedCounters, estimatedRates, and filterImpacts when available.
type
stringCampaign type
creditReserved
numberCredits to reserve on launch
targetEmails
integerRequested unique email lead goal
emailCollectionGoal
integernullableInternal raw-email collection goal when validation may reduce deliverable emails
maxItemsToProcess
integernullableInternal processing cap derived by the backend
maxProfilesToScan
integernullableInternal profile scan cap derived by the backend
pricingVersion
stringPricing model used for the reservation estimate
reservationVersion
stringReservation schema version used by the backend
maxCreditCap
numbernullableConfigured hard stop cap for billable requests
estimatedCredits
numbernullableRecommended/default hard cap from the reserve preview
estimatedUsageCredits
numbernullableExpected usage credits before conservative cap buffer
reserveUsageCredits
numbernullableReserve-counter usage credits before conservative cap buffer
recommendedMaxCreditCap
numbernullableConservative recommended hard cap
summary
objectnullableCustomer-facing budget summary with max credit spend, scan count, hidden-email lookup estimate, and public email rate
targetMode
stringnullableWhether the preview targets email leads
budgetMode
stringnullableWhether the cap is recommended, user-limited, or custom
filterImpacts
arraynullableActive filter impacts with selectivity and direct counter details
estimatedCounters
objectnullableEstimated billable API-call counters from reserve preview
expectedCounters
objectnullableExpected billable API-call counters from reserve preview
reserveCounters
objectnullableReserve billable API-call counters used for the hard cap estimate
estimatedRates
objectnullablePer-counter credit rates used by reserve preview
rateRegistryChecksum
stringnullableChecksum for the pricing rate registry used by the estimate
assumptions
objectnullablePreview assumptions such as internal scan caps and rates
warnings
arrayReserve-preview warnings shown before launch
POST/campaigns

Create campaign

Creates a new scraping campaign and reserves credits across Instagram, X/Twitter, YouTube, Facebook, LinkedIn, and TikTok. All supported campaign types should call /campaigns/reserve-preview first and send the same top-level targetEmails value to campaign creation. The backend derives internal scan caps. All reserve-preview campaign types may include maxCreditCap to hard-stop the worker before the next billable request. If maxCreditCap is omitted, the backend uses the reserved credit estimate as the cap. Deep email search is automatically enabled for supported non-email-only campaign types, and enableDeepEmailSearch: true remains accepted for backward compatibility. Email-only keyword campaigns should omit it. Enable enableEmailValidation to verify emails in real time during the campaign.

Request Bodyrequired

application/json

FieldTypeDescription
title
stringHuman-readable campaign name. Auto-generated if omitted.(max 100 chars)
typerequired
stringCampaign type — determines which inputs fields are required.
INSTAGRAM_HASHTAGINSTAGRAM_USER_FOLLOWERSINSTAGRAM_USER_FOLLOWINGINSTAGRAM_POST_LIKERSINSTAGRAM_POST_COMMENTERSINSTAGRAM_PROFILE_LISTINSTAGRAM_KEYWORD_SEARCHYOUTUBE_KEYWORD_SEARCHYOUTUBE_CHANNEL_SEARCHFACEBOOK_KEYWORD_SEARCHLINKEDIN_KEYWORD_SEARCHTWITTER_KEYWORD_SEARCHTIKTOK_KEYWORD_SEARCHTIKTOK_SEARCH_USERSTIKTOK_USER_FOLLOWERSTIKTOK_USER_FOLLOWINGTIKTOK_POST_COMMENTERSX_KEYWORD_SEARCHX_FOLLOWERSX_FOLLOWINGX_RETWEETSX_REPLIERS
inputsrequired
objectType-specific inputs. See endpoint description for which fields each campaign type requires.
hashtag
stringSingle hashtag for INSTAGRAM_HASHTAG campaigns. No # prefix needed.(max 100 chars)
hashtags
arrayArray of hashtags for INSTAGRAM_HASHTAG campaigns (max 20). Use instead of hashtag for multi-hashtag campaigns.(max 20 items)
targetUser
stringUsername for follower/following campaigns. No @ prefix needed.(max 100 chars)
mediaUrl
string<uri>Full post URL for liker/commenter/retweet/replier campaigns. Must be a valid HTTPS URL.(max 2048 chars)
keyword
stringSingle search keyword for keyword search campaigns.(max 200 chars)
keywords
arrayArray of search keywords (max 20). Use instead of keyword for multi-keyword campaigns.(max 20 items)
countries
arrayOptional list of 2-letter ISO 3166-1 alpha-2 country codes for keyword search, YouTube channel search, TikTok user search, Instagram targeting, and all X campaign types. Omit for global search. Max 10 countries.(max 10 items)
goal
stringOptional legacy campaign goal for keyword-search campaigns. New campaign creation does not require this field. If sent, use one of: sell_products, find_influencers, remarketing, agency_leads, recruiting, other.
sell_productsfind_influencersremarketingagency_leadsrecruitingother
goalOther
stringOptional legacy free-text goal detail. Required only when a legacy client sends goal as "other".(max 200 chars)
targetEmailsrequired
integerRequested number of unique email leads. Send the same value used in /campaigns/reserve-preview.(11,000,000)
maxCreditCap
numberOptional hard stop for any reserve-preview campaign type, including Instagram. If omitted, the backend defaults the cap to the credits reserved at campaign creation.
enableDeepEmailSearch
booleanBackward-compatible flag. Deep email search is automatically enabled for supported non-email-only campaign types; send true if included, and omit for email-only keyword campaigns.Default: true for supported campaign types
enableEmailValidation
booleanValidate emails in real time during the campaign. Review the updated budget preview before launch.Default: false

Responses

201Campaign created
FieldTypeDescription
campaign
objectThe created campaign object
_id
stringCampaign ID
createdBy
stringUser ID of creator
title
stringCampaign name
type
stringCampaign type
status
stringCampaign status
pendingscrapingscraping_completedprocessing_emailsfully_completedfailedstopped
inputs
objectCampaign inputs
targetEmails
integerUser-facing unique email lead goal
limits
objectBackend-derived internal caps and legacy compatibility fields
enableDeepEmailSearch
booleanWhether automatic deep email search was applied for a supported campaign type
enableEmailValidation
booleanWhether email validation is enabled
emailScanCount
integerEmails found so far
profileScannedCount
integerProfiles scanned so far
progressPercentage
numberProgress 0–100
creditSettlement
objectCredit accounting
isSettled
booleanWhether credits have been settled
settledAt
string<date-time>nullableWhen settlement completed
creditReserved
numberCredits reserved upfront
creditUsed
numberCredits consumed
creditReturned
numberCredits refunded
creditCharged
numberNet credits charged
pricingVersion
stringPricing model used for the reservation estimate
reservationVersion
stringReservation schema version used by the backend
maxCreditCap
numbernullableConfigured hard stop cap for billable requests
estimatedCredits
numbernullableRecommended/default hard cap from the reserve preview
estimatedUsageCredits
numbernullableExpected usage credits before conservative cap buffer
reserveUsageCredits
numbernullableReserve-counter usage credits before conservative cap buffer
recommendedMaxCreditCap
numbernullableConservative recommended hard cap
summary
objectnullableCustomer-facing budget summary with max credit spend, scan count, hidden-email lookup estimate, and public email rate
targetMode
stringnullableWhether the preview targets email leads
budgetMode
stringnullableWhether the cap is recommended, user-limited, or custom
filterImpacts
arraynullableActive filter impacts with selectivity and direct counter details
estimatedCounters
objectnullableEstimated billable API-call counters from reserve preview
expectedCounters
objectnullableExpected billable API-call counters from reserve preview
reserveCounters
objectnullableReserve billable API-call counters used for the hard cap estimate
estimatedRates
objectnullablePer-counter credit rates used by reserve preview
rateRegistryChecksum
stringnullableChecksum for the pricing rate registry used by the estimate
assumptions
objectnullablePreview assumptions such as internal scan caps and rates
warnings
arrayReserve-preview warnings shown before launch
breakdown
objectPer-category credit usage (present once settled)
initialEmails
integerProfiles with an initial email
deepSearchEmails
integerProfiles with a hidden email found; audit counter for IG v2, not a direct fee
noEmails
integerProfiles scanned with no email
validations
integerEmails run through validation
settlementVersion
integerInternal settlement schema version
phaseState
objectAuthoritative per-phase state (scraping / deepsearch / validation / settlement)
scraping
objectScraping phase
status
stringPhase status
not_applicablependingrunningcompletefailed
startedAt
string<date-time>nullableWhen phase started
completedAt
string<date-time>nullableWhen phase completed
finalCounts
objectnullableSealed counts on completion
lastError
objectnullableMost recent error (if any)
deepsearch
objectHidden-email search phase (same shape as scraping)
validation
objectEmail validation phase (same shape as scraping)
settlement
objectCredit settlement lifecycle
status
stringSettlement status
not_readyreadyin_progressdonefailed_retryingfailed_terminal
attempts
integerNumber of settlement attempts
lastAttemptAt
string<date-time>nullableMost recent settlement attempt
nextAttemptAt
string<date-time>nullableNext scheduled retry (if failed_retrying)
settledAt
string<date-time>nullableWhen settlement completed
lastError
objectnullableMost recent settlement error
postValidation
objectnullablePost-campaign validation status
createdAt
string<date-time>Creation timestamp
updatedAt
string<date-time>Last update timestamp
finishedAt
string<date-time>nullableCompletion timestamp

Example

curl -X POST https://api.scravio.com/api/campaigns \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "INSTAGRAM_HASHTAG",
  "inputs": {
    "hashtags": [
      "fitness",
      "gym"
    ]
  },
  "targetEmails": 500,
  "enableDeepEmailSearch": true,
  "enableEmailValidation": true
}'
GET/campaigns

List campaigns

Returns a paginated list of the authenticated user's campaigns, sorted by creation date (newest first) by default. Soft-deleted campaigns are excluded automatically.

Parameters

NameInTypeDescription
page
queryintegerPage numberDefault: 1
perPage
queryintegerItems per page (max 100)Default: 10
status
querystringFilter by campaign status
pendingscrapingscraping_completedprocessing_emailsfully_completedfailedstopped
type
querystringComma-separated campaign types or platform shorthands (e.g. INSTAGRAM, X)
q
querystringFree-text search on title, hashtag, target user, media URL, keyword
sortBy
querystringSort fieldDefault: createdAt
createdAtprogressstatus
order
querystringSort directionDefault: desc
ascdesc
from
querystringStart date filter (ISO 8601)
to
querystringEnd date filter (ISO 8601)

Responses

200Paginated campaign list
FieldTypeDescription
items
arrayArray of Campaign objects
pagination
objectPagination metadata
totalCount
integerTotal items
totalPages
integerTotal pages
currentPage
integerCurrent page
perPage
integerItems per page

Example

curl -X GET https://api.scravio.com/api/campaigns?page=1&perPage=10&status=fully_completed \
  -H "X-API-Key: sk_live_your_api_key"
GET/campaigns/{id}

Get campaign details

Returns full details of a single campaign owned by the authenticated user, including computed fields, target metadata, and credit settlement.

Parameters

NameInTypeDescription
idrequired
pathstringCampaign ID

Responses

200Campaign details
FieldTypeDescription
_id
stringCampaign ID
title
stringCampaign name
type
stringCampaign type
status
stringCampaign status
pendingscrapingscraping_completedprocessing_emailsfully_completedfailedstopped
inputs
objectCampaign inputs
targetEmails
integerUser-facing unique email lead goal
limits
objectBackend-derived internal caps and legacy compatibility fields
enableDeepEmailSearch
booleanWhether automatic deep email search was applied for a supported campaign type
enableEmailValidation
booleanWhether email validation is enabled
emailScanCount
integerEmails found
profileScannedCount
integerProfiles scanned
progressPercentage
numberProgress 0–100
maxItemsToProcess
integerInternal processing limit
normalizedCounts
objectComputed totals (only in detail response)
profiles
integerTotal profiles
emails
integerTotal emails
creditSettlement
objectCredit accounting
isSettled
booleanWhether credits have been settled
settledAt
string<date-time>nullableWhen settlement completed
creditReserved
numberCredits reserved
creditUsed
numberCredits consumed
creditReturned
numberCredits refunded
creditCharged
numberNet credits charged
pricingVersion
stringPricing model used for the reservation estimate
reservationVersion
stringReservation schema version used by the backend
maxCreditCap
numbernullableConfigured hard stop cap for billable requests
estimatedCredits
numbernullableRecommended/default hard cap from the reserve preview
estimatedUsageCredits
numbernullableExpected usage credits before conservative cap buffer
reserveUsageCredits
numbernullableReserve-counter usage credits before conservative cap buffer
recommendedMaxCreditCap
numbernullableConservative recommended hard cap
summary
objectnullableCustomer-facing budget summary with max credit spend, scan count, hidden-email lookup estimate, and public email rate
targetMode
stringnullableWhether the preview targets email leads
budgetMode
stringnullableWhether the cap is recommended, user-limited, or custom
filterImpacts
arraynullableActive filter impacts with selectivity and direct counter details
estimatedCounters
objectnullableEstimated billable API-call counters from reserve preview
expectedCounters
objectnullableExpected billable API-call counters from reserve preview
reserveCounters
objectnullableReserve billable API-call counters used for the hard cap estimate
estimatedRates
objectnullablePer-counter credit rates used by reserve preview
rateRegistryChecksum
stringnullableChecksum for the pricing rate registry used by the estimate
assumptions
objectnullablePreview assumptions such as internal scan caps and rates
warnings
arrayReserve-preview warnings shown before launch
breakdown
objectPer-category credit usage (present once settled)
initialEmails
integerProfiles with an initial email
deepSearchEmails
integerProfiles with a hidden email found; audit counter for IG v2, not a direct fee
noEmails
integerProfiles scanned with no email
validations
integerEmails run through validation
settlementVersion
integerInternal settlement schema version
phaseState
objectAuthoritative per-phase state (scraping / deepsearch / validation / settlement). Updates push a `campaignUpdate` WebSocket event — treat as invalidation and refetch.
scraping
objectScraping phase
status
stringPhase status
not_applicablependingrunningcompletefailed
startedAt
string<date-time>nullableWhen phase started
completedAt
string<date-time>nullableWhen phase completed
finalCounts
objectnullableSealed counts on completion
lastError
objectnullableMost recent error (if any)
deepsearch
objectHidden-email search phase (same shape as scraping)
validation
objectEmail validation phase (same shape as scraping)
settlement
objectCredit settlement lifecycle
status
stringSettlement status
not_readyreadyin_progressdonefailed_retryingfailed_terminal
attempts
integerNumber of settlement attempts
lastAttemptAt
string<date-time>nullableMost recent settlement attempt
nextAttemptAt
string<date-time>nullableNext scheduled retry (if failed_retrying)
settledAt
string<date-time>nullableWhen settlement completed
lastError
objectnullableMost recent settlement error
postValidation
objectnullablePost-campaign validation status
status
stringValidation status
idlevalidatingcompletedfailed
total
integerTotal emails to validate
validated
integerEmails validated so far
valid
integerValid emails
invalid
integerInvalid emails
creditReserved
numberCredits reserved for validation
creditUsed
numberCredits used for validation
creditReturned
numberCredits refunded after validation
startedAt
string<date-time>When validation started
completedAt
string<date-time>When validation completed
error
stringnullableError message if validation failed
createdAt
string<date-time>Creation timestamp
updatedAt
string<date-time>Last update
finishedAt
string<date-time>nullableCompletion timestamp
platformUserId
stringPlatform-specific user ID of the target (profile-based campaigns)
fullName
stringFull name of the target user (profile-based campaigns)
profilePicUrl
stringProfile picture URL of the target user
bio
stringBiography of the target user
followerCount
integerFollower count of the target user
followingCount
integerFollowing count of the target user
mediaCount
integerMedia/post count of the target user
isVerified
booleanWhether target user is verified on the platform
isBusiness
booleanWhether target user has a business account
hashtagMediaCount
integerTotal media count for the hashtag (hashtag campaigns)
targetPostAuthorUsername
stringUsername of the post author (post-based campaigns)
targetPostAuthorName
stringDisplay name of the post author
targetPostAuthorProfilePicUrl
stringProfile picture of the post author
targetPostLikeCount
integerLike count on the target post
targetPostCommentCount
integerComment count on the target post
targetPostId
stringPlatform-specific post ID
targetPostCaptionText
stringCaption text of the target post
authorUsername
stringAuthor username (X/Twitter campaigns)
authorName
stringAuthor display name (X/Twitter campaigns)
commentCount
integerComment count
likeCount
integerLike count
captionText
stringCaption or post text
targetFollowerCount
integerTarget user follower count
mediaPostCount
integerTarget user media post count
404Campaign not found or does not belong to user

Example

curl -X GET https://api.scravio.com/api/campaigns/507f1f77bcf86cd799439011 \
  -H "X-API-Key: sk_live_your_api_key"
GET/campaigns/{id}/leads

List campaign leads

Returns the scraped leads (contacts) discovered by a campaign. Each lead represents a social-media profile and may include email, username, follower count, biography, and platform-specific metadata. Free accounts receive masked email values by default. Eligible free accounts can reveal up to five individual lead rows from the dashboard; exports remain masked until a confirmed purchase unlocks the account. Additional platform-specific fields (e.g. xPostText, linkedinHeadline, tiktokVideoUrl, facebookCategory) may be included when available.

Parameters

NameInTypeDescription
idrequired
pathstringCampaign ID
page
queryintegerPage numberDefault: 1
perPage
queryintegerItems per pageDefault: 10
hasEmail
querybooleanFilter leads with/without email
validationStatus
querystringFilter by email validation result
validinvalidpending
platform
querystringFilter by source platform
instagramyoutubelinkedinfacebooktiktokx
sourceType
querystringFilter by lead source type
emailSource
querystringFilter by how the email was discovered
sortBy
querystringSort fieldDefault: hasEmail
hasEmailfollowerCountscrapedAt
order
querystringSort directionDefault: desc
ascdesc

Responses

200Paginated lead list
FieldTypeDescription
items
arrayArray of Lead objects
_id
stringLead ID
campaignId
stringParent campaign ID
platform
stringSource platform
instagramyoutubelinkedinfacebooktiktokx
sourceType
stringLead source type
profilekeyword
email
string<email>nullableEmail address (may be masked)
emailMasked
booleanTrue when email fields are masked for the current account.
emailRevealed
booleanTrue when this lead has been individually revealed by the current free account.
canRevealEmail
booleanTrue when this lead can be revealed with the account free reveal quota.
emailSource
stringHow the email was discovered
initialdeep_searchnone
phoneNumber
stringnullablePhone number
username
stringnullableSocial media username
fullName
stringnullableDisplay name
biography
stringnullableProfile biography
followerCount
integernullableNumber of followers
followingCount
integernullableNumber following
mediaCount
integernullableNumber of posts/media
externalUrl
stringnullableWebsite URL from profile
profilePicUrl
stringnullableProfile picture URL
isPrivate
booleannullableWhether account is private
isVerified
booleannullableWhether account is verified
isBusiness
booleannullableWhether account is a business
country
stringnullableCountry
accountCreatedDate
string<date-time>nullableWhen the account was created
latitude
numbernullableLatitude coordinate
longitude
numbernullableLongitude coordinate
cityName
stringnullableCity
addressStreet
stringnullableStreet address
emailValidation
objectnullableEmail validation result
status
stringValidation status
isValid
booleanWhether email is valid
checkedAt
string<date-time>Validation timestamp
keyword
stringnullableKeyword that matched this lead (keyword search campaigns)
scrapedAt
string<date-time>When the lead was scraped
pagination
objectPagination metadata
totalCount
integerTotal items
totalPages
integerTotal pages
currentPage
integerCurrent page
perPage
integerItems per page
404Campaign not found or does not belong to user

Example

curl -X GET https://api.scravio.com/api/campaigns/507f1f77bcf86cd799439011/leads?hasEmail=true&page=1&perPage=20 \
  -H "X-API-Key: sk_live_your_api_key"
POST/campaigns/{id}/stop

Stop a running campaign

Sends a graceful stop signal to a running campaign. The campaign must be in an active state (pending, scraping, or processing_emails). The worker finishes the current batch, and unused reserved credits are automatically refunded. This endpoint is idempotent — calling it multiple times is safe. Rate limit: 5 requests per minute per campaign.

Parameters

NameInTypeDescription
idrequired
pathstringCampaign ID

Responses

200Campaign stopped
FieldTypeDescription
campaignId
stringCampaign ID
stopRequested
booleanWhether stop was requested
status
stringUpdated campaign status
stoppedBy
stringWho stopped the campaign
stoppedReason
stringnullableReason for stopping

Example

curl -X POST https://api.scravio.com/api/campaigns/507f1f77bcf86cd799439011/stop \
  -H "X-API-Key: sk_live_your_api_key"
GET/campaigns/{id}/validate/preview

Preview validation cost

Returns a cost estimate for running post-campaign email validation. Call this before POST /campaigns/{id}/validate to check whether the account has enough credits.

Parameters

NameInTypeDescription
idrequired
pathstringCampaign ID

Responses

200Validation cost preview
FieldTypeDescription
campaignId
stringCampaign ID
emailsToValidate
integerNumber of emails to validate
creditCost
numberTotal credits required
currentBalance
numberAccount's current balance
hasSufficientCredits
booleanWhether balance covers cost
canValidate
booleanWhether validation can proceed

Example

curl -X GET https://api.scravio.com/api/campaigns/507f1f77bcf86cd799439011/validate/preview \
  -H "X-API-Key: sk_live_your_api_key"
POST/campaigns/{id}/validate

Start post-campaign email validation

Starts asynchronous email validation for all leads with emails in a completed campaign. Returns 202 Accepted; validation runs in the background. Prerequisites: campaign must be in fully_completed or stopped status. Account must have sufficient credits (check with GET /campaigns/{id}/validate/preview). Returns 409 if another validation is already running for this campaign. Credits are reserved upfront. After validation completes, unused credits are refunded. Subscribe to WebSocket events for real-time progress: - campaignValidationStarted — validation has begun - campaignValidationProgress — periodic update with validated, valid, invalid counts - campaignValidationCompleted — all emails validated with final credit breakdown - campaignValidationFailed — unrecoverable error occurred Rate limit: 3 requests per minute per campaign.

Parameters

NameInTypeDescription
idrequired
pathstringCampaign ID

Responses

202Validation started
FieldTypeDescription
campaignId
stringCampaign ID
jobId
stringValidation job ID
emailsToValidate
integerNumber of emails being validated
creditCost
numberCredits reserved
status
stringValidation status (validating)

Example

curl -X POST https://api.scravio.com/api/campaigns/507f1f77bcf86cd799439011/validate \
  -H "X-API-Key: sk_live_your_api_key"

Validation

Submit and manage standalone email validation jobs created from pasted email lists or uploaded CSV/TXT files. These jobs are separate from campaign validation, which is tracked on campaign objects.

GET/validation-jobs

List validation jobs

Returns a paginated list of standalone email validation jobs (created via POST /validation-jobs/text or the file upload endpoints). Post-campaign validations are tracked on the campaign object, not listed here.

Parameters

NameInTypeDescription
page
queryintegerPage numberDefault: 1
limit
queryintegerItems per pageDefault: 10
status
querystringFilter by job status
pendingparsingqueuedprocessingcompletedfailed
from
querystringStart date filter (ISO 8601)
to
querystringEnd date filter (ISO 8601)
sortBy
querystringSort fieldDefault: createdAt
createdAtcompletedAt
order
querystringSort directionDefault: desc
ascdesc

Responses

200Paginated validation job list
FieldTypeDescription
success
booleanRequest success status
data
objectResponse data
jobs
arrayArray of ValidationJob objects
jobId
stringJob ID
status
stringJob status
pendingparsingqueuedprocessingcompletedfailed
totalEmails
integerTotal unique emails submitted
processedCount
integerEmails validated so far
validCount
integerValid email count
invalidCount
integerInvalid email count
createdAt
string<date-time>Creation timestamp
completedAt
string<date-time>nullableCompletion timestamp
downloadUrl
stringnullableResults CSV download URL (when completed)
total
integerTotal job count
page
integerCurrent page
pages
integerTotal pages
requestId
stringRequest tracking ID

Example

curl -X GET https://api.scravio.com/api/validation-jobs?page=1&limit=10 \
  -H "X-API-Key: sk_live_your_api_key"
POST/validation-jobs/text

Submit emails for validation

Creates a standalone email validation job from a list of email addresses. Independent of any campaign. Input: pass an emails array of strings, or a single comma-separated string. Duplicates are removed automatically (case-insensitive). Limits: minimum 1 email, maximum 5,000 after deduplication. Credits: reserved upfront. If cancelled before completion, unused credits are refunded. Concurrency: only one active job (pending or processing) per account. Wait for the current job to finish or cancel it before submitting a new one. Rate limit: 3 requests per hour.

Request Bodyrequired

application/json

FieldTypeDescription
emailsrequired
arrayArray of email addresses, or a single comma-separated string. Duplicates removed automatically (case-insensitive). Max 5,000 after deduplication.

Responses

201Validation job created
FieldTypeDescription
success
booleanRequest success status
data
objectResponse data
jobId
stringJob ID
status
stringJob status
createdAt
string<date-time>Creation timestamp
creditsUsed
numberCredits reserved
totalEmails
integerUnique emails after deduplication
requestId
stringRequest tracking ID

Example

curl -X POST https://api.scravio.com/api/validation-jobs/text \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "emails": [
    "[email protected]",
    "[email protected]",
    "[email protected]"
  ]
}'
POST/validation-jobs/file

Request validation file upload

Creates a short-lived presigned upload URL for a CSV/TXT validation file. The file is uploaded directly to private object storage; the backend still verifies the object before parsing.

Request Bodyrequired

application/json

FieldTypeDescription
filenamerequired
stringOriginal filename for display and extension validation
contentTyperequired
stringBrowser-reported MIME type; backend treats this as advisory
sizeBytesrequired
integerFile size in bytes
idempotencyKeyrequired
stringClient-generated key used to safely retry upload creation

Responses

201Upload ticket created
FieldTypeDescription
success
booleanRequest success status
data
objectUpload ticket
uploadId
stringUpload ID
key
stringPrivate storage key generated by the backend
uploadUrl
stringShort-lived presigned PUT URL
expiresAt
string<date-time>Upload URL expiry
maxSizeBytes
integerMaximum accepted file size
allowedContentTypes
arrayAccepted content types

Example

curl -X POST https://api.scravio.com/api/validation-jobs/file \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "filename": "leads.csv",
  "contentType": "text/csv",
  "sizeBytes": 123456,
  "idempotencyKey": "8b3d7c2e-5c7e-4a37-a0ea-b92fdb33bb5b"
}'
POST/validation-jobs/file/process

Parse uploaded validation file

Parses the private uploaded file and returns backend-confirmed review data. This step does not reserve credits or create the validation job.

Request Bodyrequired

application/json

FieldTypeDescription
uploadIdrequired
stringUpload ID returned by POST /validation-jobs/file
keyrequired
stringPrivate storage key returned by POST /validation-jobs/file
filenamerequired
stringOriginal filename for display and audit logs
idempotencyKeyrequired
stringSame client-generated key used for the upload ticket

Responses

200File parsed
FieldTypeDescription
success
booleanRequest success status
data
objectBackend-confirmed parse review
parseId
stringParse result ID used by the confirm endpoint
status
stringParse status
totalEmails
integerUnique emails detected
totalRows
integerRows scanned
duplicatesRemoved
integerDuplicate emails removed
invalidRows
integerRows ignored because no email was detected
estimatedCredits
numberEstimated credits required to confirm the job
columns
arrayDetected candidate email columns
key
stringColumn key sent to confirm
label
stringColumn label shown to the user
emailLikeCount
integerEmail-like values in this column
recommendedColumn
stringnullableBackend-recommended column key

Example

curl -X PUT "https://storage.example/presigned-upload-url" \
  -H "Content-Type: text/csv" \
  --upload-file ./leads.csv

curl -X POST https://api.scravio.com/api/validation-jobs/file/process \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "uploadId": "upl_123",
  "key": "private/generated/key",
  "filename": "leads.csv",
  "idempotencyKey": "8b3d7c2e-5c7e-4a37-a0ea-b92fdb33bb5b"
}'
POST/validation-jobs/file/confirm

Confirm parsed validation file

Creates the validation job from backend-confirmed parse data and reserves credits. Retries must use the same idempotency key to avoid double-charging.

Request Bodyrequired

application/json

FieldTypeDescription
parseIdrequired
stringParse ID returned by POST /validation-jobs/file/process
selectedColumn
stringEmail column key selected by the user
idempotencyKeyrequired
stringSame client-generated key used for upload and process

Responses

201Validation job queued
FieldTypeDescription
success
booleanRequest success status
data
objectQueued validation job
jobId
stringValidation job ID
status
stringInitial job status
totalEmails
integerUnique emails queued for validation
creditsReserved
numberCredits reserved for the job

Example

curl -X POST https://api.scravio.com/api/validation-jobs/file/confirm \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "parseId": "parse_123",
  "selectedColumn": "email",
  "idempotencyKey": "8b3d7c2e-5c7e-4a37-a0ea-b92fdb33bb5b"
}'
GET/validation-jobs/{id}

Get validation job details

Returns full details of a validation job including real-time progress. The downloadUrl field is only present when the job status is completed.

Parameters

NameInTypeDescription
idrequired
pathstringValidation job ID

Responses

200Validation job details
FieldTypeDescription
success
booleanRequest success status
data
objectValidationJob object
jobId
stringJob ID
status
stringJob status
pendingparsingqueuedprocessingcompletedfailed
statusReason
stringnullableHuman-readable reason if cancelled or failed
totalEmails
integerTotal unique emails submitted
processedCount
integerEmails validated so far
validCount
integerValid email count
invalidCount
integerInvalid email count
externalRequestId
stringnullableExternal tracking ID
createdAt
string<date-time>Creation timestamp
updatedAt
string<date-time>Last update timestamp
completedAt
string<date-time>nullableCompletion timestamp
downloadUrl
stringnullablePre-signed URL to download results CSV (only when completed)
requestId
stringRequest tracking ID
404Job not found or does not belong to user

Example

curl -X GET https://api.scravio.com/api/validation-jobs/507f1f77bcf86cd799439013 \
  -H "X-API-Key: sk_live_your_api_key"
GET/validation-jobs/{id}/download

Get validation results download URL

Returns a short-lived pre-signed URL for downloading completed validation results as CSV. The URL is only available after the job status is completed.

Parameters

NameInTypeDescription
idrequired
pathstringValidation job ID

Responses

200Validation results download URL
FieldTypeDescription
success
booleanRequest success status
data
objectDownload URL response
downloadUrl
stringShort-lived pre-signed CSV download URL
expiresIn
integernullableSeconds until the URL expires
requestId
stringRequest tracking ID
404Job not found, incomplete, or does not belong to user

Example

curl -X GET https://api.scravio.com/api/validation-jobs/507f1f77bcf86cd799439013/download \
  -H "X-API-Key: sk_live_your_api_key"

Exports

Create and download CSV/XLSX list exports from campaign leads.

POST/list-exports

Create a list export

Creates a CSV or XLSX export file containing leads from a campaign. Processing runs asynchronously — returns 201 and you can poll GET /list-exports/{id}/download for the result. Idempotent: if a pending/processing export already exists for the same campaign and options, the existing export is returned. Rate limit: 5 requests per hour.

Request Bodyrequired

application/json

FieldTypeDescription
campaignIdrequired
stringCampaign ID to export leads from
emailOnly
booleanExport only leads that have an emailDefault: false
onlyValidEmails
booleanExport only leads with validated (deliverable) emailsDefault: false
fileFormat
stringExport file formatDefault: csv
csvxlsx

Responses

201Export created or processing
FieldTypeDescription
success
booleanRequest success status
data
objectExport data
exportId
stringExport ID
status
stringExport status
progress
numberProgress percentage
isEmailOnly
booleanWhether export is email-only
onlyValidEmails
booleanWhether export is valid-only
fileFormat
stringFile format (csv or xlsx)
csvxlsx
createdAt
string<date-time>Creation timestamp
completedAt
string<date-time>nullableCompletion timestamp
requestId
stringRequest tracking ID
200Existing completed export reused (same campaign and options, data unchanged)

Example

curl -X POST https://api.scravio.com/api/list-exports \
  -H "X-API-Key: sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "campaignId": "507f1f77bcf86cd799439011",
  "emailOnly": true,
  "fileFormat": "csv"
}'
GET/list-exports

List exports

Returns a paginated list of the account's export jobs. Filter by campaignId or status.

Parameters

NameInTypeDescription
page
queryintegerPage numberDefault: 1
perPage
queryintegerItems per pageDefault: 10
campaignId
querystringFilter by campaign ID
status
querystringFilter by export status
pendingprocessingcompletedfailed
sortBy
querystringSort fieldDefault: createdAt
createdAtcompletedAtstatus
order
querystringSort directionDefault: desc
ascdesc

Responses

200Paginated export list
FieldTypeDescription
success
booleanRequest success status
data
objectResponse data
exports
arrayArray of ListExport objects
exportId
stringExport ID
campaignId
stringCampaign ID
status
stringExport status
pendingprocessingcompletedfailed
progress
numberProgress percentage
isEmailOnly
booleanWhether email-only
onlyValidEmails
booleanWhether valid-only
filename
stringnullableOutput filename (after completion)
totalRecords
integerTotal records exported (after completion)
fileSize
integernullableFile size in bytes (after completion)
fileFormat
stringFile format
csvxlsx
createdAt
string<date-time>Creation timestamp
completedAt
string<date-time>nullableCompletion timestamp
pagination
objectPagination metadata
totalCount
integerTotal items
totalPages
integerTotal pages
currentPage
integerCurrent page
perPage
integerItems per page
requestId
stringRequest tracking ID

Example

curl -X GET https://api.scravio.com/api/list-exports?page=1&perPage=10 \
  -H "X-API-Key: sk_live_your_api_key"
GET/list-exports/{id}/download

Get export download URL

Returns a download URL and filename for a completed export file. The export must have status: completed — requesting a download for a pending/processing/failed export returns 400.

Parameters

NameInTypeDescription
idrequired
pathstringExport ID

Responses

200Download URL
FieldTypeDescription
success
booleanRequest success status
data
objectDownload data
downloadUrl
string<uri>Pre-signed download URL
filename
stringSuggested filename
requestId
stringRequest tracking ID

Example

curl -X GET https://api.scravio.com/api/list-exports/507f1f77bcf86cd799439014/download \
  -H "X-API-Key: sk_live_your_api_key"

Credits

View your credit transaction history and balance changes.

GET/credit-transactions

List credit transactions

Returns a paginated ledger of all credit transactions. Each entry records a single balance change with balanceBefore, amount (negative for deductions, positive for credits), and balanceAfter.

Parameters

NameInTypeDescription
page
queryintegerPage numberDefault: 1
perPage
queryintegerItems per pageDefault: 10
type
querystringComma-separated transaction types
CAMPAIGN_RESERVATIONCAMPAIGN_SETTLEMENTCAMPAIGN_OVERAGEEMAIL_VALIDATION_DEDUCTIONEMAIL_VALIDATION_REFUNDSUBSCRIPTION_INITIALSUBSCRIPTION_RENEWALSUBSCRIPTION_UPGRADESUBSCRIPTION_DOWNGRADEPAYMENT_PADDLEPAYMENT_CRYPTOMUSPAYMENT_STRIPE_TOPUPPAYMENT_PADDLE_TOPUPADMIN_CREDIT_ADJUSTMENT
campaignId
querystringFilter by campaign ID
from
querystringStart date filter (ISO 8601)
to
querystringEnd date filter (ISO 8601)
sortBy
querystringSort fieldDefault: timestamp
timestampamount
order
querystringSort directionDefault: desc
ascdesc

Responses

200Paginated transaction list
FieldTypeDescription
transactions
arrayArray of CreditTransaction objects
id
stringTransaction ID
timestamp
string<date-time>Transaction timestamp
balanceBefore
numberBalance before transaction
amount
numberAmount (negative = deduction, positive = credit)
balanceAfter
numberBalance after transaction
type
stringTransaction type
description
stringHuman-readable description
campaignId
stringnullableRelated campaign ID
paymentId
stringnullablePayment transaction ID (payment transactions only)
paymentGateway
stringnullablePayment gateway name (payment transactions only)
correlationId
stringnullableCorrelation ID for tracking related transactions
metadata
objectnullableAdditional metadata
createdAt
string<date-time>Creation timestamp
pagination
objectPagination metadata
totalCount
integerTotal items
totalPages
integerTotal pages
currentPage
integerCurrent page
perPage
integerItems per page
requestId
stringRequest tracking ID

Example

curl -X GET https://api.scravio.com/api/credit-transactions?page=1&perPage=10&sortBy=timestamp&order=desc \
  -H "X-API-Key: sk_live_your_api_key"
Table of Contents