- authentication
- Secret API key as a bearer token
- billing
- Free.
The rules behind ok_to_send on every phone lookup this account runs: the countries it sends to, the line types it refuses, the signals that block, the risk-score ceiling, whether a live check must have reached the handset, and whether a single lookup of a number the suppression list holds as opted out is blocked. The policy belongs to the account, so every member reads and changes the same one. An invalid number is always blocked whatever the policy says.
ok_to_send is a fraud and deliverability decision computed from the answer and these rules. It is not consent to message anyone and not a do-not-call scrub; neither is part of the answer.
Example request
curl https://spaw.co/api/v1/phone/policy \ -H "Authorization: Bearer sk_live_…"
This endpoint has no console on its page. It answers with records from your own account, often by an id only you have, rather than about a value you can type here. The dashboard lists the same rows.
Responses
200The policy in force.
{
"success": true,
"data": {
"max_risk_score": 60,
"block_signals": [
"fictional",
"disposable",
"reported_abuse",
"reported_abuse_widely",
"premium_rate"
],
"allowed_countries": null,
"blocked_countries": null,
"blocked_line_types": [],
"require_reachable": false,
"block_opted_out": true,
"is_default": true,
"updated_at": null
}
}Error codes
Failures answer { success: false, error: { code, message, request_id } }. Each code has its own page.