# Scanning Text

The `scan` endpoint allows you to apply Policies and Detection Rules to a list of text strings provided as a `payload`.

```sh
curl --request POST \
     --url https://api.nightfall.ai/v3/scan \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer  NF-rEpLaCeM3w1ThYoUrNiGhTfAlLKeY123' \
     --header 'Content-Type: application/json' \
     --data '
{
     "policy": {
          "detectionRules": [
               {
                    "detectors": [
                         {
                              "minNumFindings": 1,
                              "minConfidence": "LIKELY",
                              "displayName": "US Social Security Number",
                              "detectorType": "NIGHTFALL_DETECTOR",
                              "nightfallDetector": "US_SOCIAL_SECURITY_NUMBER"
                         }
                    ],
                    "name": "My Match Rule",
                    "logicalOp": "ANY"
               }
          ]
     },
     "payload": [
          "The customer social security number is 458-02-6124",
          "No PII in this string"
     ]
}
```

You may use[ Pre-Configured Detection Rules](https://help.nightfall.ai/developer-api/key-concepts/scanning_features/pre_configured_detection_rules) or [Create Inline Detection Rules](https://help.nightfall.ai/developer-api/key-concepts/scanning_features/inline_detection_rules)

Text scanning supports the use of[ Exclusion Rules](https://help.nightfall.ai/developer-api/key-concepts/scanning_features/exclusion_rules),[ Context Rules](https://help.nightfall.ai/developer-api/key-concepts/scanning_features/context_rules), and [Redaction](https://docs.nightfall.ai/docs/using-redactions)[ ](https://help.nightfall.ai/developer-api/key-concepts/scanning_features/redaction)as well as other [Scanning Features](https://docs.nightfall.ai/docs/scanning-features).

For scanning files, see [Scanning Files](https://help.nightfall.ai/developer-api/key-concepts/file_scan).

Note that you must generate an[ API key ](https://help.nightfall.ai/developer-api/key-concepts/setup/api_key)to send requests to the Nightfall API.
