Precleared Hooks API

The Hooks API from Precleared — 2 operation(s) for hooks.

GitHub OpenAPI

Operations 3

GET /api/v1/hooks/pre-send Get signed Quickly hook settings #
POST /api/v1/hooks/pre-send Decide before a lead's first cold email #
POST /api/v1/hooks/pre-send/{key_prefix} Decide before a lead's first cold email #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/precleared-dev:precleared-dev-hooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

precleared-dev-hooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Precleared Hooks 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: £9 for 300 checks (a key''s first purchase) or £39 for 2,000 checks. Auto top-up always buys the £39 pack. Every new key, including HubSpot portals, gets 14 days at 100 checks a day, starting with the first check. Monthly plan: £15 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
tags:
- name: Hooks
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: 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.
      tags:
      - Hooks
      operationId: getApiV1HooksPreSend
      x-operation-id-source: derived
    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'
      tags:
      - Hooks
      operationId: postApiV1HooksPreSend
      x-operation-id-source: derived
  /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'
      tags:
      - Hooks
      operationId: postApiV1HooksPreSendByKeyPrefix
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: Optional API key, pc_live_...