# Verify Address — Xverify

> Sends an address verification request. See the documentation.

- Key: `xverify-verify-address`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Xverify (`xverify`) — https://pipedream.com/apps/xverify.md
- This page (HTML): https://pipedream.com/apps/xverify/actions/verify-address
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/xverify/actions/verify-address/verify-address.mjs

## Description

Sends an address verification request. [See the documentation](https://apidocs.xverify.com/#address-verification-api-endpoint).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `domain` | `string` | Yes | The domain you have configured in your Xverify settings under which this query should be processed. See below. Options are loaded from the connected account. |
| `address1` | `string` | Yes | The street address to be verified. |
| `address2` | `string` | No | The second line of the street address to be verified. |
| `city` | `string` | No | The city of the address to be verified. |
| `state` | `string` | No | The state of the address to be verified. |
| `zip` | `string` | No | The postal code of the address to be verified. Required if city and state are not provided. |
| `urbanization` | `string` | No | A component of certain addresses in Puerto Rico. |
| `parse` | `boolean` | No | Set to true if you want the street address to be parsed into individual elements in the response. |
| `aff` | `string` | No | The ID you define to identify the affiliate or source of the email for reporting or potential blocking. |
| `subaff` | `string` | No | The sub-identifier you define for the affiliate or source of the email for reporting or potential blocking. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "xverify",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "xverify-verify-address",
  arguments: {
    domain: "Domain",
    address1: "Street Address 1",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "xverify-verify-address",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    xverify: { authProvisionId: "apn_xxxxxxx" },
    domain: "Domain",
    address1: "Street Address 1",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "xverify-verify-address",
    "configured_props": {
      "xverify": { "authProvisionId": "apn_xxxxxxx" },
      "domain": "Domain",
      "address1": "Street Address 1"
    }
  }'
```

---

- App: https://pipedream.com/apps/xverify.md · All apps: https://pipedream.com/apps
