{
  "openapi": "3.0.1",
  "info": {
    "title": "TCPA Consent Certificate API - Lead Verification Data",
    "description": "Check the consent certificate behind a lead before you call it. Confirms the lead's email and phone match the certificate, reads the consent language, scans the page text, and returns session metadata: page URL, IP geolocation, browser, OS, time on page and bot detection.",
    "version": "0.1",
    "x-build-id": "9Au0lPYm2z5QrvEOE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~lead-consent-certificate-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-lead-consent-certificate-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nabeelbaghoor~lead-consent-certificate-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-lead-consent-certificate-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nabeelbaghoor~lead-consent-certificate-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-lead-consent-certificate-api",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "certificates": {
            "title": "Certificates to check",
            "type": "array",
            "description": "The certificate URLs or bare certificate ids to check, one per line. A full URL is reduced to its id for you, so you can paste the value exactly as it arrived on the lead.",
            "items": {
              "type": "string"
            }
          },
          "leads": {
            "title": "Leads with their contact details",
            "type": "array",
            "description": "For lead matching: one object per lead, each with a certificate and the contact details the lead arrived with. Recognised keys are certificate, email, phone, reference, vendor and campaignId. A certificate listed here is used in preference to the same certificate in the plain list, because it carries more to work with."
          },
          "operations": {
            "title": "What to run against each certificate",
            "type": "array",
            "description": "Several operations travel in one call and each reports separately. Lead matching needs an email or a phone number per certificate. Retain is the only one that writes: it stores the certificate against your own account at the provider's price, so it is off unless you ask for it.",
            "items": {
              "type": "string",
              "enum": [
                "insights",
                "matchLead",
                "verify",
                "retain"
              ],
              "enumTitles": [
                "Insights: session metadata, geolocation, device and page scans",
                "Match lead: does the lead's own email and phone appear on the certificate",
                "Verify: consent language, one-to-one wording, font size and contrast",
                "Retain: store the certificate against your account (this writes)"
              ]
            },
            "default": [
              "insights"
            ]
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own API key for this provider. The actor sends it as the password of an HTTP Basic pair whose username is the fixed string API, which is what this provider expects. Bring your own key: nothing is shared between runs and the key is never written to the dataset."
          },
          "insightsProperties": {
            "title": "Which session data points to return",
            "type": "array",
            "description": "In insights mode, the individual data points to ask for. Leave empty for all of them. Only data points your account is contracted for are available, and the provider charges only for the ones it actually returns, so asking widely costs nothing extra for points it cannot answer.",
            "items": {
              "type": "string",
              "enum": [
                "age_seconds",
                "approx_ip_geo",
                "bot_detected",
                "browser",
                "confirmed_owner",
                "created_at",
                "domain",
                "expires_at",
                "form_input_kpm",
                "form_input_method",
                "form_input_wpm",
                "ip",
                "is_framed",
                "is_masked",
                "num_sensitive_content_elements",
                "num_sensitive_form_elements",
                "os",
                "page_url",
                "parent_page_url",
                "seconds_on_page"
              ],
              "enumTitles": [
                "Seconds since the last recorded event",
                "Approximate location from the IP address",
                "Whether the events look non-human",
                "Browser name, version and user agent",
                "The verified owner of the certificate",
                "When the session was recorded",
                "The domain shown to the consumer",
                "When the certificate expires",
                "Keystrokes per minute while filling the form",
                "How the form fields were filled",
                "Words per minute while filling the form",
                "The consumer's public IP address",
                "Whether the form was inside an iframe",
                "Whether the certificate is masked",
                "Count of hidden sensitive content elements",
                "Count of hidden sensitive form elements",
                "Operating system and whether it is mobile",
                "The page hosting the form",
                "The parent page, when framed",
                "Seconds between load and the last event"
              ]
            },
            "default": []
          },
          "scanRequired": {
            "title": "Text that must appear on the page",
            "type": "array",
            "description": "Terms the recorded page content must contain, one per line. The search is case and whitespace insensitive. Use it to prove the disclosure you require was actually on screen.",
            "items": {
              "type": "string"
            }
          },
          "scanForbidden": {
            "title": "Text that must not appear on the page",
            "type": "array",
            "description": "Terms the recorded page content must not contain, one per line. Use it to catch incentive wording such as free or prize that would undermine the consent.",
            "items": {
              "type": "string"
            }
          },
          "scanDelimiter": {
            "title": "Wildcard delimiter",
            "type": "string",
            "description": "The delimiter used to wrap wildcards inside a scan term. It has to be the same at both ends, for example a single pipe, a double equals or a triple pipe. Leave empty when your terms carry no wildcards."
          },
          "advertiserName": {
            "title": "Advertiser legal name",
            "type": "string",
            "description": "In verify mode, the legal entity name to test the one-to-one consent wording against. Without it the one-to-one result comes back empty. The provider normalises case, extra spaces and punctuation before comparing."
          },
          "minFontSizePx": {
            "title": "Minimum consent font size in pixels",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "In verify mode, the smallest font size the consent language may be set in and still pass. Leave empty to use whatever is configured on your account."
          },
          "minContrastRatio": {
            "title": "Minimum consent contrast ratio",
            "minimum": 1,
            "maximum": 21,
            "type": "integer",
            "description": "In verify mode, the smallest contrast ratio between the consent text and its background that still passes. Leave empty to use whatever is configured on your account."
          },
          "optInTypesAllowed": {
            "title": "Opt-in types you accept",
            "type": "array",
            "description": "In verify mode, which ways of giving consent count as valid. Leave empty to use whatever is configured on your account.",
            "items": {
              "type": "string",
              "enum": [
                "manual",
                "pre-selected",
                "non-interactive"
              ],
              "enumTitles": [
                "Manual: the consumer actively ticked a box",
                "Pre-selected: the box was ticked by default",
                "Non-interactive: consent implied by submitting the form"
              ]
            },
            "default": []
          },
          "matchEmail": {
            "title": "Email to match, for every certificate",
            "type": "string",
            "description": "In lead matching, an email address to test against every certificate in the plain list. Per-lead addresses in the lead list always win over this. You may pass a SHA1 hash instead of the address itself."
          },
          "matchPhone": {
            "title": "Phone number to match, for every certificate",
            "type": "string",
            "description": "In lead matching, a phone number to test against every certificate in the plain list. Per-lead numbers in the lead list always win over this. You may pass a SHA1 hash instead of the number itself."
          },
          "retainVendor": {
            "title": "Vendor to record when retaining",
            "type": "string",
            "description": "In retain mode, the name of the company that supplied the lead. Stored on your copy of the certificate and available to group by in the provider's reporting. Other accounts cannot see it."
          },
          "retainReference": {
            "title": "Reference to record when retaining",
            "type": "string",
            "description": "In retain mode, any text that helps you find the lead again later, such as your own lead id or a link to it in another system."
          },
          "retainCampaignId": {
            "title": "Campaign id to record when retaining",
            "type": "string",
            "description": "In retain mode, the campaign that produced the lead. Recorded separately from the vendor so you can report on either."
          },
          "onlySuccessfulOutcome": {
            "title": "Keep only certificates whose overall outcome succeeded",
            "type": "boolean",
            "description": "The provider's own guidance is to decide whether to buy a lead on the overall outcome. Turn this on to drop everything else before it reaches the dataset.",
            "default": false
          },
          "onlyMatchedLeads": {
            "title": "Keep only leads whose contact details matched",
            "type": "boolean",
            "description": "Drops certificates where the lead's own email or phone number was not found on the certificate. Only meaningful when lead matching is one of the operations.",
            "default": false
          },
          "onlyApprovedConsent": {
            "title": "Keep only certificates that passed the consent checks",
            "type": "boolean",
            "description": "Drops certificates where the consent language, one-to-one wording, opt-in type, font size or contrast failed. Only meaningful when verify is one of the operations.",
            "default": false
          },
          "excludeBotDetected": {
            "title": "Drop certificates that look like bot traffic",
            "type": "boolean",
            "description": "Drops rows the provider's own detection flagged as unlikely to be a human filling the form.",
            "default": false
          },
          "minSecondsOnPage": {
            "title": "Minimum seconds on page",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Drops certificates where the consumer spent less than this long on the form. A very short session is a common signal of an unattended submission."
          },
          "skipNotFound": {
            "title": "Leave misses out of the dataset",
            "type": "boolean",
            "description": "Certificates that had expired, could not be found or were refused are written as rows with the reason, so you can see what happened to every input. Turn this on to keep only the ones that answered. Misses are never charged for either way.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop after this many rows. Rows are charged individually, so this is the ceiling on what a run can cost.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "How fast to call the provider. Lower it if your account is rate limited.",
            "default": 60
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}