> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lendflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Twilio Lookup

## Twilio Lookup

The **Twilio Lookup** Workflow Builder block validates an individual's phone number and retrieves line status and line-type intelligence. The current block represents `twilio_lookup`.

## Requirements

| Application field | Requirement | Notes |
| - | - | - |
| Phone number | Required | Must be non-empty; international E.164 format is recommended. |
| Country code | Optional | Use a country code when the phone number is not in international format. |

## API flow

1. Call [Enrich Business Credit Application](/api-reference/workflow-management/enrich-business-credit-application).
2. Set `provider` to `twilio_lookup`.
3. Put `phone_number` and optional `country_code` in `options`.
4. Confirm `data.onqueue: true`.
5. Check the latest lifecycle status with [Get Commercial Data](/api-reference/workflow-management/get-commercial-data), filtered with `services[]=twilio_lookup`.
6. Retrieve the provider-specific validation records from `GET /api/applications/{application_id}/validate_numbers` and select records whose `business_credit_service` is `twilio_lookup`. This provider-specific route does not currently have an OpenAPI reference operation.

```json theme={"system"}
{
  "provider": "twilio_lookup",
  "options": {
    "phone_number": "+14155550100",
    "country_code": "US"
  }
}
```

## Data Orchestration availability and flow

The block is available in the **Phone Number Verification** group for individual entities. Each execution uses Twilio Lookup's configured default fields and stores a validation record. The caller cannot select additional Twilio Lookup packages through this block.

## What the service returns

| Result area | Response path | Meaning |
| - | - | - |
| Lifecycle | `data.statuses.twilio_lookup` from [Get Commercial Data](/api-reference/workflow-management/get-commercial-data) | Latest Twilio Lookup execution message. |
| Validation records | Provider-specific `GET /api/applications/{application_id}/validate_numbers` route (not currently represented in OpenAPI) | Stored validity, normalized line type, line status, and raw Twilio response. |

## Representative response

```json theme={"system"}
{
  "data": [{
        "phone_number": "+14155550100",
        "is_valid": true,
        "line_type": "non_fixed_voip",
        "line_status": "active",
        "response": {
          "valid": true,
          "countryCode": "US",
          "phoneNumber": "+14155550100",
          "nationalFormat": "(415) 555-0100",
          "callingCountryCode": "1",
          "lineStatus": {"status": "active", "error_code": null},
          "lineTypeIntelligence": {
            "type": "nonFixedVoip",
            "error_code": null,
            "carrier_name": "Example Carrier",
            "mobile_country_code": "310",
            "mobile_network_code": null
          },
          "validationErrors": []
        }
      }]
}
```

## Field meanings

| Field | Type | Meaning |
| - | - | - |
| `is_valid`, `response.valid` | Boolean | Whether Twilio considers the phone number valid. |
| `line_type` | String or null | Lendflow-normalized line type. |
| `line_status` | String or null | Lendflow stores a status only when Twilio's line-status object has no error code. |
| `countryCode` | String | ISO-style country code returned by Twilio. |
| `phoneNumber` | String | International phone number returned by Twilio. |
| `nationalFormat` | String | Country-specific display format. |
| `lineStatus.status` | String or null | Provider line status, such as `active`, when available. |
| `lineStatus.error_code` | Integer or null | A non-null provider error prevents Lendflow from treating the status as reliable. |
| `lineTypeIntelligence.type` | String or null | Twilio's line-type value, such as `mobile`, `landline`, or `nonFixedVoip`. |
| `carrier_name` | String or null | Carrier returned by Twilio. |
| `validationErrors` | Array or null | Provider validation errors for the supplied number. |

Other default Lookup fields can be null when Twilio did not return or could not calculate them.

## Errors and statuses

| Signal | Meaning |
| - | - |
| HTTP `422` | `phone_number` is missing, options are invalid, or the service is unavailable. |
| `valid: false` | Twilio completed the request but did not validate the number. |
| `lineStatus.error_code` is non-null | The line-status package did not provide a usable status; stored `line_status` is null. |
| `Started` | Lookup is in progress. |
| `Success` | Lendflow stored the returned validation, including invalid-number results. |

## FAQ

<AccordionGroup>
  <Accordion title="How is Twilio Lookup different from Numverify?">
    Both validate numbers and identify line types. Twilio Lookup additionally exposes configured line-status intelligence and Twilio-specific metadata.
  </Accordion>

  <Accordion title="Why is line_status null when lineStatus.status is present?">
    Lendflow stores the status only when the same Twilio object has no error code.
  </Accordion>

  <Accordion title="Can this block validate business entities?">
    No. The current block is available only for individual entities.
  </Accordion>
</AccordionGroup>
