{"openapi":"3.1.0","info":{"title":"Precleared API","version":"1.0.0","description":"Per-address verdicts on cold marketing email, with the rule quoted and a signed receipt. Covers the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the United Arab Emirates, Egypt and Qatar: UK PECR and GDPR, US CAN-SPAM, Canadian CASL, German UWG, French CPCE, Australia's Spam Act, Ireland's ePrivacy Regulations, the Dutch Telecommunicatiewet, Spain's LSSI, Italy's Privacy Code, Latvia's Information Society Services Law, the UAE's PDPL, Egypt's Personal Data Protection Law and Qatar's Personal Data Privacy Protection Law. Decision support with sources, not legal advice. Packs: \u00a39 for 300 checks (a key's first purchase) or \u00a339 for 2,000 checks. Auto top-up always buys the \u00a339 pack. Every new key, including HubSpot portals, gets 14 days at 100 checks a day, starting with the first check. Monthly plan: \u00a315 for 100 checks a day. Unused daily checks do not roll over. Packs are used after the largest eligible free, trial or active\/past_due plan allowance, never below the channel minimum. Cancel at \/manage; the plan runs to the paid period end."},"servers":[{"url":"https:\/\/precleared.dev"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional API key, pc_live_..."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}},"DailyLimit":{"type":"object","required":["error","message","operator_message","get_key_url","create_key","limit","resets_at","retry_after"],"properties":{"error":{"type":"string","const":"daily_limit"},"message":{"type":"string"},"operator_message":{"type":"string","description":"Pass this message to the person running the agent."},"get_key_url":{"type":"string","format":"uri","description":"Free-key page with ?ref=limit."},"create_key":{"type":"object","required":["method","url","body"],"properties":{"method":{"type":"string","const":"POST"},"url":{"type":"string","format":"uri","description":"Keys endpoint on the request origin, https:\/\/precleared.dev\/api\/v1\/keys on the public site."},"body":{"type":"object","required":["email"],"properties":{"email":{"type":"string","example":"<your operator's email>"}}}},"description":"Create a free key with the operator's email. The 201 reply returns it once; save it. New keys get 14 days at 100 checks a day, starting with the first check. Limits: 3 keys per email and 5 new keys per network in a rolling 24 hours."},"limit":{"type":"integer","description":"Keyless daily allowance for this channel."},"resets_at":{"type":"string","format":"date-time","description":"Next midnight UK time."},"retry_after":{"type":"integer","minimum":1,"description":"Seconds until the daily allowance resets."}}},"PaymentRequired":{"type":"object","required":["error","message","operator_message","buy_url","auto_topup","enable_auto_topup_url","manage_url","packs","limit","resets_at","retry_after"],"properties":{"error":{"type":"string","const":"payment_required"},"message":{"type":"string"},"operator_message":{"type":"string","description":"Pass these newline-separated instructions to the person running the agent."},"buy_url":{"type":"string","format":"uri","description":"The key's \u00a339 checkout for 2,000 checks."},"auto_topup":{"type":"boolean"},"enable_auto_topup_url":{"type":"string"},"manage_url":{"type":"string"},"starter_url":{"type":"string","format":"uri","description":"Present only when the key's first-purchase starter checkout is available."},"limit_period":{"type":"string","const":"month","description":"Optional. Present when a standard free key has used its free checks for the UK month."},"free_per_month":{"type":"integer","description":"Optional. The key's free checks a UK month over the API and A2A."},"free_used_month":{"type":"integer","minimum":0,"description":"Optional. Free checks the key has used this UK month."},"month_resets_at":{"type":"string","format":"date-time","description":"Optional. 00:00 UK time on the 1st of next month, when the monthly free checks come back."},"plan_url":{"type":"string","format":"uri","description":"Tracked p=monthly checkout for 100 checks a day at \u00a315 a month. Omitted for active or past-due plans."},"agent_payment":{"type":"object","required":["protocol","method","how","pack_url"],"properties":{"protocol":{"type":"string","const":"mpp"},"method":{"type":"string","const":"stripe"},"how":{"type":"string"},"pack_url":{"type":"string","format":"uri"},"starter_url":{"type":"string","format":"uri","description":"Only while the key can buy its first-purchase starter."}},"description":"Present only when agent payments are on. POST the pay URL, pay the Stripe MPP challenge and repeat the POST with the Payment credential."},"packs":{"type":"array","items":{"type":"object","required":["id","name","price_gbp","checks","url"],"properties":{"id":{"type":"string","enum":["starter","pack"]},"name":{"type":"string"},"price_gbp":{"type":"number"},"checks":{"type":"integer"},"url":{"type":"string","format":"uri"}}},"description":"Always contains the \u00a339 pack; contains the \u00a39 starter only when available."},"limit":{"type":"integer","description":"This key's free daily allowance for the channel."},"resets_at":{"type":"string","format":"date-time","description":"Next midnight UK time."},"retry_after":{"type":"integer","minimum":1,"description":"Seconds until reset. Body only; a 402 has no Retry-After header."}}},"CheckRequest":{"type":"object","properties":{"recipient_email":{"type":"string"},"recipient_domain":{"type":"string"},"sender_country":{"type":"string","enum":["GB","US","CA","DE","FR","AU","IE","NL","ES","IT","LV","AE","EG","QA"],"default":"GB","description":"Country the sending business is based in: any covered country (GB, US, CA, DE, FR, AU, IE, NL, ES, IT, LV, AE, EG or QA). CA senders must also meet the existing CASL implied-consent rule: published address without a refusal statement and a role-relevant pitch. CASL footer requirements are added."},"pitch":{"type":"string"},"address_source":{"type":"string","enum":["published","bought","scraped","given","unknown"],"default":"unknown"},"recipient_country":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Recipient country as a two-letter code. Covers the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the United Arab Emirates, Egypt and Qatar."},"default_recipient_country":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Used only when the country can't be worked out. recipient_country always wins."},"company_name":{"type":"string","maxLength":160,"description":"The recipient's company or organisation name if you know it. For UK recipients it is used to search Companies House when the domain alone does not find the company. A company is only used when other evidence links it to the recipient, including a distinctive domain stem match."},"recipient_name":{"type":"string","maxLength":120,"description":"The recipient's full name if you know it. For UK recipients it is matched against a company's current officers. Precleared does not store it."},"company_number":{"type":"string","description":"When a site shows no company number, Precleared searches Companies House by name. Website or named-officer evidence gives legal_form_source companies_house_search with one step lower confidence. A distinctive domain stem can also confirm a supplied or website-derived company name as companies_house_name_domain with medium confidence."},"pitch_relevant":{"type":"boolean"},"existing_customer":{"type":"boolean","default":false},"suppressed":{"type":"boolean"}}},"Receipt":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"request_hash":{"type":"string"},"response_hash":{"type":"string"},"signature":{"type":"string"},"algorithm":{"type":"string"},"key_version":{"type":"string"},"verify_url":{"type":"string"}}},"CheckResponse":{"type":"object","required":["charged"],"properties":{"charged":{"type":"boolean","description":"False for unknown xx_unknown_country answers and one qualifying re-check within 24 hours. Combined cap: 50 per UK day per key, or keyless IP, then charged as normal. Apify partner billing unchanged."},"free_recheck_of":{"type":"string","description":"Earlier receipt id. Same address and key, or keyless channel, within 24 hours of a charged unknown or consent_needed answer with recipient_country, company_name or company_number added or changed. Once per address in 24 hours."},"held_because":{"type":"object","required":["case","evidence"],"properties":{"case":{"type":"string","enum":["likely_sole_trader","sole_trader_stated","company_not_linked","no_company_found"]},"evidence":{"type":"array","items":{"type":"string"}}}},"possible_company":{"type":"object","required":["name","number"],"properties":{"name":{"type":"string"},"number":{"type":"string"}},"description":"Unconfirmed company suggestion. Never establishes recipient country."},"verdict":{"type":"string","enum":["ok_to_email","consent_needed","blocked","unknown"]},"confidence":{"type":"string","enum":["high","medium","low"]},"reasons":{"type":"array","items":{"type":"object"}},"rules_applied":{"type":"array","items":{"type":"string"}},"footer_text":{"type":["string","null"]},"next_step":{"type":["string","null"]},"facts":{"type":"object","description":"legal_form_source companies_house_name_domain means an active company matching the supplied or website-derived name is confirmed by a distinctive recipient domain stem match, with medium confidence. Exact matches must be unique; fuzzy names require at least 0.6 token overlap and the same domain guard. Generic words alone and fewer than five matched letters do not confirm a company. legal_form_source companies_house_stem_area means no name was given or printed, but the only active company whose name is the domain stem (at least 8 letters, with a distinctive word) has its registered office in the same postcode area as an address printed on the website, with medium confidence. Dormant companies, common-word names and sites that print a company number never use it. A name-plus-domain match whose name has only one distinctive word also needs the registered office in a postcode area printed on the website. Scottish partnerships are corporate subscribers under PECR. When the recipient's address or registered office is in Scotland, held reasons say sole trader, not sole trader or partnership. legal_form_source public_sector_domain means the recipient's domain is a UK public-sector one (.gov.uk, .ac.uk, .sch.uk, .police.uk and similar). legal_form_source is unavailable when Companies House could not be searched by name, or unconfirmed when one exact active company matches the domain but the website could not be read to confirm it runs the site. Both UK verdicts are unknown. For unconfirmed, pass company_number only if the website or your lead data confirms the company named in the notes; otherwise check again later."},"receipt":{"$ref":"#\/components\/schemas\/Receipt"},"rules_version":{"type":"string"},"usage":{"type":"object","properties":{"trial_ends_at":{"type":"string","format":"date-time","description":"Present while the key trial is running."},"plan_url":{"type":"string","format":"uri","description":"Tracked p=monthly checkout, added to keyed low\/heads-up notices unless a plan is active. In the last three trial days, notice includes the trial end date and monthly option."},"free_remaining_today":{"type":"integer"},"credits_remaining":{"type":"integer"},"auto_topup":{"type":"boolean","description":"Present for keyed calls. Whether auto top-up is enabled."},"manage_url":{"type":"string","description":"Key settings page. Present in auto top-up low-balance notices."},"low_balance":{"type":"boolean","description":"Present when the key has 1 to 200 pack checks left."},"top_up_url":{"type":"string","description":"Checkout link for another 2,000 checks at low pack balance. Omitted while an automatic top-up is on its way; included if it failed. At low free allowance with zero credits, links to \/buy?ref=low instead, without creating checkout."},"get_key_url":{"type":"string","description":"Free-key page with ?ref=low, present near the keyless daily limit."},"notice":{"type":"string","description":"Free-allowance heads-up at max(2, 20% of the keyless allowance) or max(3, 20% of the key allowance) remaining, when credits are zero. Also used for the unchanged low pack balance or auto top-up failure notice."}}},"disclaimer":{"type":"string"}}}}},"paths":{"\/api\/v1\/hooks\/pre-send":{"get":{"summary":"Get signed Quickly hook settings","description":"Read-only. Send Authorization: Bearer or X-API-Key. Secret is base64url HMAC-SHA256 of pre-send-hook-v1:<key_hash> using the existing receipt signing secret, truncated to 43 characters. Does not start the trial or spend a check. Keep it private. Prefix ambiguity fails closed.","security":[{"bearer":[]}],"responses":{"200":{"description":"Hook URL, secret and five settings. No-store.","content":{"application\/json":{"schema":{"type":"object","required":["url","secret","settings","docs"],"properties":{"url":{"type":"string","format":"uri"},"secret":{"type":"string","minLength":43,"maxLength":43},"docs":{"type":"string","format":"uri"},"settings":{"type":"object","required":["PRE_SEND_HOOK_URL","PRE_SEND_HOOK_SECRET","PRE_SEND_HOOK_TIMEOUT","PRE_SEND_HOOK_FIELDS","PRE_SEND_HOOK_ON_ERROR"],"properties":{"PRE_SEND_HOOK_URL":{"type":"string"},"PRE_SEND_HOOK_SECRET":{"type":"string"},"PRE_SEND_HOOK_TIMEOUT":{"type":"string","const":"10"},"PRE_SEND_HOOK_FIELDS":{"type":"string","const":"contact"},"PRE_SEND_HOOK_ON_ERROR":{"type":"string","const":"hold"}}}}}}}},"401":{"description":"Invalid or revoked key."},"500":{"description":"Settings unavailable."}}},"post":{"summary":"Decide before a lead's first cold email","description":"Quickly pre-send contract. Same REST check allowance, trial, credits and receipts, with an eight-second facts budget. ok_to_email allows; consent_needed and blocked deny; unknown holds for one hour then six hours, then denies on the third keyed unknown in seven days. Keyless unknowns always hold six hours. Allowance and engine problems return HTTP 200 hold. Keyed replies always have X-Hook-Signature: v1=hex HMAC-SHA256(secret, exact response body). Keyless, no signature. Uses the caller IP's keyless REST allowance.","security":[],"parameters":[{"name":"sender_country","in":"query","schema":{"type":"string","enum":["GB","US","CA","DE","FR","AU","IE","NL","ES","IT","LV","AE","EG","QA"],"default":"GB"}},{"name":"address_source","in":"query","schema":{"type":"string","enum":["published","bought","scraped","given","unknown"],"default":"unknown"}},{"name":"pitch","in":"query","schema":{"type":"string","maxLength":2000}},{"name":"recipient_country","in":"query","schema":{"type":"string","pattern":"^[A-Za-z]{2}$"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["event","version","lead"],"properties":{"event":{"type":"string","const":"pre_send"},"version":{"type":"number","example":1},"timestamp":{"type":"string","format":"date-time"},"lead":{"type":"object","required":["email"],"properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email","maxLength":254},"name":{"type":"string","maxLength":120},"custom_data":{"type":"object","additionalProperties":{"type":["string","number","boolean"]},"description":"First non-empty string company, company_name, organisation, organization, account or employer (case-insensitive) becomes company_name, trimmed to 120 characters."}}},"campaign":{"type":"object"},"sequence_index":{"type":"integer"}}}}}},"responses":{"200":{"description":"Allow, hold or deny. Allowance exhaustion is hold (keyed: six hours; keyless: next UK day plus 60 seconds). Unexpected errors hold one hour.","headers":{"X-Hook-Signature":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"type":"object","required":["decision"],"properties":{"decision":{"type":"string","enum":["allow","hold","deny"]},"reason":{"type":"string","maxLength":300},"reference":{"type":"string","maxLength":120},"retry_after_seconds":{"type":"integer","minimum":1,"maximum":604800,"description":"Hold only."}}}}}},"400":{"description":"invalid_request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Keyed only: invalid_signature, including unknown\/revoked prefix, missing\/wrong signature or timestamp outside 300 seconds.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/hooks\/pre-send\/{key_prefix}":{"post":{"summary":"Decide before a lead's first cold email","description":"Quickly pre-send contract. Same REST check allowance, trial, credits and receipts, with an eight-second facts budget. ok_to_email allows; consent_needed and blocked deny; unknown holds for one hour then six hours, then denies on the third keyed unknown in seven days. Keyless unknowns always hold six hours. Allowance and engine problems return HTTP 200 hold. Keyed replies always have X-Hook-Signature: v1=hex HMAC-SHA256(secret, exact response body).","security":[],"parameters":[{"name":"key_prefix","in":"path","required":true,"schema":{"type":"string","maxLength":12}},{"name":"X-Quickly-Timestamp","in":"header","required":true,"schema":{"type":"string","pattern":"^[0-9]+$"},"description":"Unix seconds within 300 seconds of now."},{"name":"X-Quickly-Signature","in":"header","required":true,"schema":{"type":"string","pattern":"^v1=[0-9a-fA-F]{64}$"},"description":"v1=hex HMAC-SHA256(hook_secret, timestamp + '.' + exact raw JSON body)."},{"name":"X-Quickly-Event","in":"header","schema":{"type":"string","const":"pre_send"}},{"name":"sender_country","in":"query","schema":{"type":"string","enum":["GB","US","CA","DE","FR","AU","IE","NL","ES","IT","LV","AE","EG","QA"],"default":"GB"}},{"name":"address_source","in":"query","schema":{"type":"string","enum":["published","bought","scraped","given","unknown"],"default":"unknown"}},{"name":"pitch","in":"query","schema":{"type":"string","maxLength":2000}},{"name":"recipient_country","in":"query","schema":{"type":"string","pattern":"^[A-Za-z]{2}$"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["event","version","lead"],"properties":{"event":{"type":"string","const":"pre_send"},"version":{"type":"number","example":1},"timestamp":{"type":"string","format":"date-time"},"lead":{"type":"object","required":["email"],"properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email","maxLength":254},"name":{"type":"string","maxLength":120},"custom_data":{"type":"object","additionalProperties":{"type":["string","number","boolean"]},"description":"First non-empty string company, company_name, organisation, organization, account or employer (case-insensitive) becomes company_name, trimmed to 120 characters."}}},"campaign":{"type":"object"},"sequence_index":{"type":"integer"}}}}}},"responses":{"200":{"description":"Allow, hold or deny. Allowance exhaustion is hold (keyed: six hours; keyless: next UK day plus 60 seconds). Unexpected errors hold one hour.","headers":{"X-Hook-Signature":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"type":"object","required":["decision"],"properties":{"decision":{"type":"string","enum":["allow","hold","deny"]},"reason":{"type":"string","maxLength":300},"reference":{"type":"string","maxLength":120},"retry_after_seconds":{"type":"integer","minimum":1,"maximum":604800,"description":"Hold only."}}}}}},"400":{"description":"invalid_request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Keyed only: invalid_signature, including unknown\/revoked prefix, missing\/wrong signature or timestamp outside 300 seconds.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/checkout":{"post":{"summary":"Buy a pack with an agent wallet","description":"POST the returned pay URL. A wallet supporting Stripe Machine Payments Protocol pays the GBP challenge, then repeats the same POST with Authorization: Payment <credential>. A credential works once. Browser GET opens Stripe Checkout instead. The \u00a315 monthly plan needs a person. If crediting fails and no credit is recorded, an automatic refund is attempted; follow the error message if credit or refund status is unconfirmed.","security":[],"responses":{"200":{"description":"Pack credited to the key.","headers":{"Payment-Receipt":{"description":"MPP payment receipt.","schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"type":"object","required":["ok","credited","credits","key_prefix","payment_intent"],"properties":{"ok":{"type":"boolean","const":true},"credited":{"type":"boolean","const":true},"credits":{"type":"integer","description":"The key's balance after crediting, not the pack size."},"key_prefix":{"type":"string"},"payment_intent":{"type":"string"}}}}}},"402":{"description":"Payment challenge, or payment_already_used with a fresh challenge and no new charge.","headers":{"WWW-Authenticate":{"description":"MPP Payment challenge for the GBP amount.","schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"anyOf":[{"type":"object","required":["error","protocol","pack","human_checkout_url","message"],"properties":{"error":{"type":"string","const":"payment_required"},"protocol":{"type":"string","const":"mpp"},"pack":{"type":"object","required":["id","price_gbp","checks"],"properties":{"id":{"type":"string","enum":["starter","standard"]},"price_gbp":{"type":"number","enum":[9,39]},"checks":{"type":"integer","enum":[300,2000]}}},"human_checkout_url":{"type":"string","format":"uri"},"message":{"type":"string"}}},{"type":"object","required":["error","payment_intent","message"],"properties":{"error":{"type":"string","const":"payment_already_used"},"payment_intent":{"type":"string"},"message":{"type":"string"}}},{"type":"object","description":"MPP challenge\/problem response for an invalid Payment credential."}]}}}},"404":{"description":"Pay link is invalid or its key is inactive."},"409":{"description":"Monthly plan needs a person, starter is unavailable, or agent payments are disabled.","content":{"application\/json":{"schema":{"oneOf":[{"type":"object","required":["error","human_checkout_url","message"],"properties":{"error":{"type":"string","enum":["monthly_needs_a_person","agent_payments_disabled"]},"human_checkout_url":{"type":"string","format":"uri"},"message":{"type":"string"}}},{"type":"object","required":["error","standard_url","message"],"properties":{"error":{"type":"string","const":"starter_not_available"},"standard_url":{"type":"string","format":"uri"},"message":{"type":"string"}}}]}}}},"500":{"description":"Payment receipt invalid, balance unavailable, credit status pending, credit failed and refunded, or credit failed and refund pending. Follow the message; do not pay again while the status is unconfirmed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"parameters":[{"name":"t","in":"query","required":true,"schema":{"type":"string"},"description":"Pay token from the returned URL, not an API key."},{"name":"p","in":"query","schema":{"type":"string","enum":["starter","standard","monthly"],"default":"standard"},"description":"Starter: \u00a39 for 300 checks on the key's first purchase. Standard: \u00a339 for 2,000 checks. Monthly: browser only."}]}},"\/pay\/{token}":{"post":{"summary":"Buy a pack with an agent wallet","description":"POST the returned pay URL. A wallet supporting Stripe Machine Payments Protocol pays the GBP challenge, then repeats the same POST with Authorization: Payment <credential>. A credential works once. Browser GET opens Stripe Checkout instead. The \u00a315 monthly plan needs a person. If crediting fails and no credit is recorded, an automatic refund is attempted; follow the error message if credit or refund status is unconfirmed.","security":[],"responses":{"200":{"description":"Pack credited to the key.","headers":{"Payment-Receipt":{"description":"MPP payment receipt.","schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"type":"object","required":["ok","credited","credits","key_prefix","payment_intent"],"properties":{"ok":{"type":"boolean","const":true},"credited":{"type":"boolean","const":true},"credits":{"type":"integer","description":"The key's balance after crediting, not the pack size."},"key_prefix":{"type":"string"},"payment_intent":{"type":"string"}}}}}},"402":{"description":"Payment challenge, or payment_already_used with a fresh challenge and no new charge.","headers":{"WWW-Authenticate":{"description":"MPP Payment challenge for the GBP amount.","schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"anyOf":[{"type":"object","required":["error","protocol","pack","human_checkout_url","message"],"properties":{"error":{"type":"string","const":"payment_required"},"protocol":{"type":"string","const":"mpp"},"pack":{"type":"object","required":["id","price_gbp","checks"],"properties":{"id":{"type":"string","enum":["starter","standard"]},"price_gbp":{"type":"number","enum":[9,39]},"checks":{"type":"integer","enum":[300,2000]}}},"human_checkout_url":{"type":"string","format":"uri"},"message":{"type":"string"}}},{"type":"object","required":["error","payment_intent","message"],"properties":{"error":{"type":"string","const":"payment_already_used"},"payment_intent":{"type":"string"},"message":{"type":"string"}}},{"type":"object","description":"MPP challenge\/problem response for an invalid Payment credential."}]}}}},"404":{"description":"Pay link is invalid or its key is inactive."},"409":{"description":"Monthly plan needs a person, starter is unavailable, or agent payments are disabled.","content":{"application\/json":{"schema":{"oneOf":[{"type":"object","required":["error","human_checkout_url","message"],"properties":{"error":{"type":"string","enum":["monthly_needs_a_person","agent_payments_disabled"]},"human_checkout_url":{"type":"string","format":"uri"},"message":{"type":"string"}}},{"type":"object","required":["error","standard_url","message"],"properties":{"error":{"type":"string","const":"starter_not_available"},"standard_url":{"type":"string","format":"uri"},"message":{"type":"string"}}}]}}}},"500":{"description":"Payment receipt invalid, balance unavailable, credit status pending, credit failed and refunded, or credit failed and refund pending. Follow the message; do not pay again while the status is unconfirmed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}},"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Pay token from the returned URL, not an API key."},{"name":"p","in":"query","schema":{"type":"string","enum":["starter","standard","monthly"],"default":"standard"},"description":"Starter: \u00a39 for 300 checks on the key's first purchase. Standard: \u00a339 for 2,000 checks. Monthly: browser only."}]}},"\/api\/v1\/keys":{"post":{"summary":"Create a free key","description":"Use the operator's email. The key is returned once; save it. New keys get 14 days at 100 checks a day, starting with the first check. The free_per_day field is the normal REST allowance after the trial. Limits: 3 keys per email and 5 new keys per network in a rolling 24 hours.","security":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":254},"name":{"type":"string","maxLength":120},"company":{"type":"string","maxLength":160},"country":{"type":"string","maxLength":60},"use_case":{"type":"string","maxLength":1000}}}}}},"responses":{"201":{"description":"New key, shown once.","content":{"application\/json":{"schema":{"type":"object","required":["key","key_prefix","free_per_day","terms_url","message"],"properties":{"key":{"type":"string"},"key_prefix":{"type":"string"},"free_per_day":{"type":"integer","const":25},"terms_url":{"type":"string","format":"uri"},"message":{"type":"string"}}}}}},"400":{"description":"Invalid JSON or email."},"429":{"description":"too_many_keys: email or network creation limit reached."},"500":{"description":"Key could not be created."}}}},"\/api\/v1\/agent\/keys":{"post":{"summary":"Buy a key with checks (agent payment)","description":"For agents with a Stripe-compatible wallet (Machine Payments Protocol). Without a Payment credential the reply is HTTP 402 with a WWW-Authenticate: Payment challenge (method stripe, intent charge, amount 900 for starter or 3900 for standard, currency gbp) and Cache-Control: no-store; nothing is created. Retry the same POST with Authorization: Payment <credential>: the key is made as POST \/api\/v1\/keys makes it, the pack's checks are added, and the 201 reply returns the key once with a Payment-Receipt header. Key limits (3 per email, 5 new keys per network in a rolling 24 hours) are checked before any charge. Retrying with the same credential never makes a second key or charges again. Follows the agent payments switch.","security":[],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"type":"object","required":["email"],"properties":{"pack":{"type":"string","enum":["starter","standard"],"default":"starter","description":"starter: \u00a39 for 300 checks. standard: \u00a339 for 2,000 checks."},"email":{"type":"string","format":"email","maxLength":254},"name":{"type":"string","maxLength":120},"use_case":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"already_created: this credential already bought a key. Returns key_prefix and credits; the key itself is not shown again and nothing new is charged."},"201":{"description":"Paid. New key with the pack's checks, shown once. Payment-Receipt header attached.","content":{"application\/json":{"schema":{"type":"object","required":["key","key_prefix","credits","pack"],"properties":{"key":{"type":"string"},"key_prefix":{"type":"string"},"credits":{"type":"integer"},"pack":{"type":"string","enum":["starter","standard"]},"payment_intent":{"type":"string"},"message":{"type":"string"}}}}}},"400":{"description":"Invalid JSON, email or pack."},"402":{"description":"payment_required with a WWW-Authenticate: Payment challenge. Body: error, protocol, pack {id, price_gbp, checks}, human_checkout_url (the \/get-key page) and message."},"409":{"description":"agent_payments_disabled with human_checkout_url, or purchase_in_progress."},"429":{"description":"too_many_keys: email or network creation limit reached. Checked before any charge."},"500":{"description":"The key could not be made after payment; the reply says whether the payment was refunded."}}}},"\/api\/v1\/key":{"get":{"summary":"Check your key","description":"Returns key status, allowances, credits and auto top-up settings without spending a check, credit or rate-limit slot, or starting the trial. Before the first check, trial_status is not_started and 100 checks are available for the first day. Responses are not cached.","security":[{"bearer":[]}],"responses":{"200":{"description":"Active key settings","content":{"application\/json":{"schema":{"type":"object","required":["key_prefix","status","created_at","free_per_day_rest","free_per_day_mcp","free_remaining_today_rest","free_remaining_today_mcp","credits_remaining","auto_topup","topup_cap_packs","low_balance","buy_url","manage_url","docs_url"],"properties":{"key_prefix":{"type":"string"},"status":{"type":"string","enum":["active"]},"created_at":{"type":"string","format":"date-time"},"trial_status":{"type":"string","const":"not_started","description":"Present while the 14-day trial is waiting for the first check."},"trial_starts":{"type":"string","const":"first_check"},"trial_ends_at":{"type":"string","format":"date-time","description":"Present while the started trial is running."},"free_per_day_rest":{"type":"integer","minimum":0},"free_per_day_mcp":{"type":"integer","minimum":0},"free_remaining_today_rest":{"type":"integer","minimum":0},"free_remaining_today_mcp":{"type":"integer","minimum":0},"free_per_month_rest":{"type":"integer","minimum":0,"description":"Optional. Present for a standard free key on the monthly free allowance: free checks a UK month over the API and A2A."},"free_used_month_rest":{"type":"integer","minimum":0,"description":"Optional. Free checks used this UK month over the API and A2A."},"free_remaining_month_rest":{"type":"integer","minimum":0,"description":"Optional. Free checks left this UK month over the API and A2A."},"month_resets_at":{"type":"string","format":"date-time","description":"Optional. 00:00 UK time on the 1st of next month."},"credits_remaining":{"type":"integer"},"auto_topup":{"type":"boolean"},"topup_cap_packs":{"type":"integer","minimum":1,"maximum":10},"low_balance":{"type":"boolean","description":"True when credits are between 1 and 200 inclusive."},"buy_url":{"type":"string","format":"uri"},"manage_url":{"type":"string","format":"uri"},"docs_url":{"type":"string","format":"uri"}}}}}},"401":{"description":"Missing, invalid or revoked key","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/check":{"post":{"summary":"Check one address","security":[{},{"bearer":[]}],"description":"Each key may make 60 checks a minute; above that the API answers 429 with retry_after in seconds. Ask support@precleared.dev for a higher limit.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CheckRequest"}}}},"responses":{"200":{"description":"Verdict","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CheckResponse"}}}},"400":{"description":"Invalid request","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"401":{"description":"Invalid or revoked key"},"402":{"description":"Free daily checks are used and no pack credits are left. Pass operator_message to the key owner. buy_url remains the \u00a339 checkout.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentRequired"}}}},"429":{"description":"Keyless daily limit or keyed minute rate limit reached.","headers":{"Retry-After":{"description":"Seconds until the daily reset or minute rate retry.","schema":{"type":"integer","minimum":1}}},"content":{"application\/json":{"schema":{"oneOf":[{"$ref":"#\/components\/schemas\/DailyLimit"},{"type":"object","required":["error","message","retry_after"],"properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"},"retry_after":{"type":"integer"}}}]}}}}}}},"\/api\/v1\/gate":{"post":{"summary":"Gate one address before sending","security":[{},{"bearer":[]}],"description":"A thin wrapper over \/api\/v1\/check. Same allowances, rate limits, receipts, pay links and usage notices; counts as one check. Only ok_to_email passes. Treat every other status as hold. Supports Bearer, X-API-Key or keyless calls. email is an alias only when recipient_email is absent.","requestBody":{"required":true,"content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/CheckRequest"},{"type":"object","properties":{"email":{"type":"string","description":"Alias for recipient_email when that field is absent."}}}]}}}},"responses":{"200":{"description":"Send: ok_to_email, with the full check result. Follow its footer requirements.","content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/CheckResponse"},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"pass"}}}]}}}},"400":{"description":"Invalid request or invalid JSON. Treat as hold.","content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/Error"},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"error"}}}]}}}},"401":{"description":"Invalid or revoked key. Treat as hold.","content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/Error"},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"error"}}}]}}}},"402":{"description":"Daily allowance and credits used. Treat as hold and pass operator_message to the key owner.","content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/PaymentRequired"},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"error"}}}]}}}},"422":{"description":"Hold: consent_needed, blocked or unknown, with the reason and full check result.","content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/CheckResponse"},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"hold"}}}]}}}},"429":{"description":"Daily or minute rate limit reached. Treat as hold.","headers":{"Retry-After":{"description":"Seconds until reset or retry.","schema":{"type":"integer","minimum":1}}},"content":{"application\/json":{"schema":{"allOf":[{"oneOf":[{"$ref":"#\/components\/schemas\/DailyLimit"},{"type":"object","required":["error","message","retry_after"],"properties":{"error":{"type":"string","const":"rate_limited"},"message":{"type":"string"},"retry_after":{"type":"integer"}}}]},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"error"}}}]}}}},"500":{"description":"The check could not be completed. Treat as hold.","content":{"application\/json":{"schema":{"allOf":[{"$ref":"#\/components\/schemas\/Error"},{"type":"object","required":["gate"],"properties":{"gate":{"type":"string","const":"error"}}}]}}}}}}},"\/api\/v1\/receipt":{"get":{"summary":"Read a receipt","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string","pattern":"^cc_rcpt_[0-9A-Z]{16}$"}}],"responses":{"200":{"description":"Receipt"},"404":{"description":"Not found"}}}},"\/api\/v1\/public-key":{"get":{"summary":"Receipt signing public key","responses":{"200":{"description":"key_version and base64 SPKI DER public_key"}}}},"\/api\/v1\/rules":{"get":{"summary":"Active rules","responses":{"200":{"description":"Rules ordered by priority"}}}},"\/api\/v1\/health":{"get":{"summary":"Service health","description":"Latest five-minute pulse: ok, degraded or unknown, with per-part flags.","responses":{"200":{"description":"Health status"}}}}}}