{
  "openapi": "3.0.1",
  "info": {
    "title": "Phone Validator, Carrier & Compliance Decisions",
    "description": "Validate and enrich phone lists with live carrier, activity, portability, DNC/TCPA, spam, fraud, and reassigned-number signals, then produce CRM-ready outreach decisions.",
    "version": "0.2",
    "x-build-id": "GUgJcxstdeKkk1mng"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fetchfinch~phone-compliance-enrichment/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fetchfinch-phone-compliance-enrichment",
        "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/fetchfinch~phone-compliance-enrichment/runs": {
      "post": {
        "operationId": "runs-sync-fetchfinch-phone-compliance-enrichment",
        "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/fetchfinch~phone-compliance-enrichment/run-sync": {
      "post": {
        "operationId": "run-sync-fetchfinch-phone-compliance-enrichment",
        "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": {
          "phoneNumbers": {
            "title": "Phone numbers",
            "type": "array",
            "description": "Quick input for a phone-only list. For CRM fields and consent evidence, use JSON records, a dataset, or a source URL instead.",
            "items": {
              "type": "string"
            }
          },
          "records": {
            "title": "JSON records",
            "type": "array",
            "description": "Array of CRM records. Set the field mappings below. Every source row is preserved in the output, including duplicate phone numbers.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "sourceDatasetId": {
            "title": "Apify dataset ID",
            "type": "string",
            "description": "Read CRM records from an existing dataset."
          },
          "sourceUrl": {
            "title": "CSV, JSON, or JSONL URL",
            "type": "string",
            "description": "HTTPS URL for a CSV with headers, a JSON array, or line-delimited JSON. Maximum response size is 50 MB."
          },
          "phoneField": {
            "title": "Phone field",
            "type": "string",
            "description": "Phone property name or dotted path, for example phone, mobile_phone, or contact.phone.",
            "default": "phone"
          },
          "idField": {
            "title": "CRM ID field",
            "type": "string",
            "description": "Optional property or dotted path copied to source_id for lossless joins back to your CRM."
          },
          "consentStatusField": {
            "title": "Consent status field",
            "type": "string",
            "description": "Optional property containing granted/denied, opted_in/opted_out, yes/no, or equivalent values."
          },
          "consentDateField": {
            "title": "Consent or last-verified date field",
            "type": "string",
            "description": "Optional date used for the US FCC Reassigned Number check. It should represent when consent or ownership was last verified."
          },
          "optOutField": {
            "title": "Internal opt-out field",
            "type": "string",
            "description": "Optional boolean-like field. True/yes/1/opted_out/unsubscribed always produces SUPPRESS."
          },
          "passThroughFields": {
            "title": "CRM fields to copy",
            "type": "array",
            "description": "Optional fields copied into flat source_* output columns for CSV-ready exports.",
            "items": {
              "type": "string"
            }
          },
          "preserveSource": {
            "title": "Include complete source record",
            "type": "boolean",
            "description": "Adds source_record to every output row. Useful for JSON workflows but increases dataset size.",
            "default": false
          },
          "defaultCountry": {
            "title": "Default country for national numbers",
            "minLength": 2,
            "maxLength": 2,
            "type": "string",
            "description": "ISO 3166-1 alpha-2 code used only when a number has no international calling code.",
            "default": "US"
          },
          "maxRecords": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Safety limit applied to dataset and remote-file sources.",
            "default": 100000
          },
          "intendedChannel": {
            "title": "Intended outreach channel",
            "enum": [
              "both",
              "sms",
              "voice"
            ],
            "type": "string",
            "description": "Controls which channel decision becomes the overall decision. Separate SMS and voice decisions are always returned.",
            "default": "both"
          },
          "campaignType": {
            "title": "Contact context",
            "enum": [
              "marketing",
              "transactional",
              "manual"
            ],
            "type": "string",
            "description": "Marketing requires affirmative consent evidence under the default policy. Transactional and manual contexts still retain internal opt-out and configured risk checks.",
            "default": "marketing"
          },
          "missingConsentAction": {
            "title": "When marketing consent is missing",
            "enum": [
              "review",
              "suppress",
              "allow"
            ],
            "type": "string",
            "description": "Default review avoids claiming permission when a source row does not prove affirmative marketing consent.",
            "default": "review"
          },
          "unknownActivityAction": {
            "title": "When live activity is unknown",
            "enum": [
              "review",
              "suppress",
              "allow"
            ],
            "type": "string",
            "description": "Controls the decision when the live provider cannot confirm whether the line is active.",
            "default": "allow"
          },
          "voipSmsAction": {
            "title": "VoIP SMS policy",
            "enum": [
              "review",
              "suppress",
              "allow"
            ],
            "type": "string",
            "description": "VoIP lines may be text-capable but often need separate fraud or deliverability review.",
            "default": "review"
          },
          "fraudReviewThreshold": {
            "title": "Fraud score review threshold",
            "minimum": 0,
            "maximum": 99,
            "type": "integer",
            "description": "Scores at or above this value are sent to review unless a stronger suppression rule applies.",
            "default": 75
          },
          "fraudSuppressThreshold": {
            "title": "Fraud score suppress threshold",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Scores at or above this value are suppressed. Must be greater than the review threshold.",
            "default": 90
          },
          "complaintReviewThreshold": {
            "title": "Government complaint review score",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Rows at or above this transparent complaint-risk score are sent to review. Complaint data is unverified and never causes automatic suppression by itself.",
            "default": 30
          },
          "enrichmentMode": {
            "title": "Enrichment mode",
            "enum": [
              "open-risk",
              "live-carrier",
              "offline"
            ],
            "type": "string",
            "description": "Open risk checks public FCC unwanted-call complaint history without credentials. Live carrier adds Telnyx current-carrier and portability data. Offline performs format and numbering-plan validation only.",
            "default": "open-risk"
          },
          "checkGovernmentComplaints": {
            "title": "Check government complaint history",
            "type": "boolean",
            "description": "Check public FCC unwanted-call complaints for NANP numbers. Numbers are sent to the FCC open-data endpoint in batched queries. Reports are unverified and are not National Do Not Call Registry registrations.",
            "default": true
          },
          "checkReassignedNumber": {
            "title": "Check number reassignment",
            "type": "boolean",
            "description": "With live-carrier mode, Twilio credentials, a US number, and a mapped consent date, query the FCC-backed Reassigned Numbers Database.",
            "default": false
          },
          "ipqsStrictness": {
            "title": "IPQS strictness",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "Start at 0. Higher strictness can increase false positives.",
            "default": 0
          },
          "concurrency": {
            "title": "Concurrent records",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Reduce this if your provider account has a low requests-per-second limit.",
            "default": 20
          },
          "ipqsApiKey": {
            "title": "IPQS API key",
            "type": "string",
            "description": "Optional fraud and provider-reputation enrichment using the caller's own IPQS account."
          },
          "telnyxApiKey": {
            "title": "Telnyx API key",
            "type": "string",
            "description": "Required for live-carrier mode. Enter your own Telnyx API key."
          },
          "twilioAccountSid": {
            "title": "Twilio Account SID",
            "type": "string",
            "description": "Optional Twilio account with Reassigned Number access. Used only for eligible US rows in live-carrier mode."
          },
          "twilioAuthToken": {
            "title": "Twilio Auth Token",
            "type": "string",
            "description": "Authentication token paired with the Twilio Account SID."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}