Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to AddressZen

Scalekit connector
Open markdown

The AddressZen connector lets your AI agent act in each user's AddressZen account. Each user connects their own AddressZen access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 7 tools.

Tools
7
What they doRead · write · destructive
6 · 1 · 06 read1 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the AddressZen connection

    In AgentKit > Connections, create an AddressZen connection. The name you give it is the connection_name your code passes. See Configure connections.

  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'addresszen'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize AddressZen:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'addresszen_address_retrieve',
    toolInput: { address: 'usa_1234567' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their AddressZen credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • addresszen_address_retrieveGet the full US-formatted address for an address suggestion ID.Read-only

    Retrieve Address

    Get the full US-formatted address for an address suggestion ID. Returns the address record with lines, city, state, ZIP code, ZIP+4 and other USPS address elements. Use this after addresszen_addresses_autocomplete. Each call is a paid lookup.

    Inputs

    addressstringrequired
    ID of address suggestion provided by the API to fully retrieve. Example: usa_1234567.
    filterstring
    Comma separated whitelist of address elements to return. E.g. filter=line_1,line_2,line_3 returns only the line_1, line_2 and line_3 address elements in your response. Example: line_1,line_2,city,state,zip_code.
    tagsstring
    A comma separated list of tags to query over. Useful if you want to specify the circumstances in which the request was made. If you specify multiple tags, the response comprises only requests that satisfy all of them. Searching "foo,bar" queries only requests tagged both "foo" and "bar". Example: checkout,web.
  • addresszen_addresses_autocompleteGet address suggestions for a partial address, in order of relevance, for search-as-you-type address entry.Read-only

    Autocomplete Addresses

    Get address suggestions for a partial address, in order of relevance, for search-as-you-type address entry. Returns result.hits, each with an id, a one-line suggestion and the dataset and country. Use this while someone types an address. Use addresszen_address_retrieve with a hit id to get the full address.

    Inputs

    querystringrequired
    The partial address string entered by the user to autocomplete. Example: 123 Main St Spring.
    bias_citystring
    Boost addresses in the named city, town or locality. Case, spaces and accents are ignored. For UK addresses use bias_posttown. Example: Springfield.
    bias_ipboolean
    Biases search based on approximate geolocation of IP address. Set bias_ip=true to enable. Example: true.
    bias_lonlatstring
    Bias search to a geospatial circle determined by an origin and radius in meters. Max radius is 50000. Uses the format bias_lonlat=[longitude],[latitude],[radius in meters]. Only one geospatial bias may be provided. Example: -104.99,39.74,10000.
    bias_postal_codestring
    Boost addresses with a matching full postal code (nine digit ZIP+4 for US addresses). Unmatched addresses still appear, ranked lower. Example: 941021234.
    bias_postal_code_2string
    Boost addresses whose postal code starts with the given segment (three digit ZIP prefix for US addresses). Example: 941.
    bias_postal_code_3string
    Boost addresses with a matching short postal code (five digit ZIP for US addresses). Example: 94102.
    bias_statestring
    Boost addresses in the named state, province or region. Example: Colorado.
    bias_state_codestring
    Boost addresses with a matching state or region code, e.g. CA. Example: CO.
    boxstring
    Restrict search to a geospatial box determined by the "top-left" and "bottom-right" geolocations. Supply 4 comma separated values ordered top_left_lon,top_left_lat,bottom_right_lon,bottom_right_lat. The top-left longitude must be less than the bottom-right longitude, and the top-left latitude greater than the bottom-right latitude. A box which fails either check is ignored. Only one geospatial box can be provided. Example: -105.1,39.9,-104.8,39.6.
    citystring
    Restrict results to addresses in the named city, town or locality. Case, spaces and accents are ignored, so San Francisco and sanfrancisco match the same addresses. For UK addresses use post_town. Example: Springfield.
    contextstring
    Limits search results, typically within a country. Example: usa.
    datasetstring
    Comma-separated list of datasets to search within. Filters results to only include addresses from the specified datasets. Useful for keys with multiple overlapping datasets enabled (e.g. paf and abp). Example: usa.
    is_businessstring
    true restricts results to business addresses; false excludes them. For US addresses this is derived from the USPS record type (F, a firm record). Example: false.one of truefalse
    is_poboxstring
    true restricts results to PO Box addresses; false excludes them. For US addresses this is derived from the USPS record type (P). Example: false.one of truefalse
    limitinteger
    Specifies the maximum number of records to retrieve. By default the limit is 10. Requesting a larger result set adds latency. Example: 10.
    postal_codestring
    Restrict results to addresses with a matching full postal code. Case, spaces and hyphens are ignored. For US addresses the full postal code is the nine digit ZIP+4 (941021234); filter on postal_code_3 for a five digit ZIP. For UK addresses use postcode. Example: 941021234.
    postal_code_2string
    Restrict results to addresses whose postal code starts with the given segment. For US addresses this is the three digit ZIP prefix (sectional center), e.g. 941 for San Francisco. Example: 941.
    postal_code_3string
    Restrict results to addresses with a matching short postal code. For US addresses this is the five digit ZIP code. Example: 94102.
    statestring
    Restrict results to addresses in the named state, province or region, e.g. California. Case and spaces are ignored. Example: Colorado.
    state_codestring
    Restrict results to addresses with a matching state or region code, e.g. the two letter USPS state abbreviation CA. Case is ignored. Example: CO.
  • addresszen_email_validateCheck whether an email address is valid and deliverable.Read-only

    Validate Email Address

    Check whether an email address is valid and deliverable. Returns result with the email, whether it is valid and deliverable, and flags such as disposable or role addresses. Use this to check one email address. Each call is a paid lookup.

    Inputs

    querystringrequired
    Specifies the email address to validate. Example: jane@example.com.
    tagsstring
    A comma separated list of tags to query over. Useful if you want to specify the circumstances in which the request was made. If you specify multiple tags, the response comprises only requests that satisfy all of them. Searching "foo,bar" queries only requests tagged both "foo" and "bar". Example: checkout,web.
  • addresszen_phone_number_validateCheck whether a phone number is valid and get its formats and network details.Read-only

    Validate Phone Number

    Check whether a phone number is valid and get its formats and network details. Returns result with validity, national and international formats, country and number type, and the current carrier when asked. Use this to check one phone number. Each call is a paid lookup.

    Inputs

    querystringrequired
    Specifies the phone number to validate. Phone number must include a country code in an acceptable format. For instance, UK phone numbers should be prefixed with +44, 44 or 0044. Example: +442071838750.
    current_carrierboolean
    When set to true, the API retrieves and populates the current network of the phone number. This operation can be slow, depending on the network and local conditions. Example: true.
    tagsstring
    A comma separated list of tags to query over. Useful if you want to specify the circumstances in which the request was made. If you specify multiple tags, the response comprises only requests that satisfy all of them. Searching "foo,bar" queries only requests tagged both "foo" and "bar". Example: checkout,web.
  • addresszen_place_resolveGet full details for a place suggestion ID.Read-only

    Resolve Place

    Get full details for a place suggestion ID. Returns the place with name, country, coordinates, timezone and GeoNames metadata. Use this after addresszen_places_search. Each call is a paid lookup.

    Inputs

    placestringrequired
    ID of place suggestion. Example: geonames_5398563.
    tagsstring
    A comma separated list of tags to query over. Useful if you want to specify the circumstances in which the request was made. If you specify multiple tags, the response comprises only requests that satisfy all of them. Searching "foo,bar" queries only requests tagged both "foo" and "bar". Example: checkout,web.
  • addresszen_address_verifyVerify, correct and standardize a US address against USPS CASS-certified data.Write

    Verify US Address

    Verify, correct and standardize a US address against USPS CASS-certified data. Returns the matched address with standardized lines, city, state, ZIP+4, delivery point details and match information, or no match. Use this to check a full address someone typed. Use addresszen_addresses_autocomplete for search-as-you-type suggestions. Each call is a paid lookup.

    Inputs

    querystringrequired
    The address to verify. Put the full address here, or only the street line when you also send zip_code, city and state. Example: 123 Main St, Springfield, CO, 81073.
    citystring
    City of the address. Example: Springfield.
    contextstring
    Identify the country of the address to verify. Defaults to United States (USA). Example: usa.
    statestring
    Two-letter state abbreviation. Example: CO.
    tagsstring
    A comma separated list of tags to query over. Useful if you want to specify the circumstances in which the request was made. If you specify multiple tags, the response comprises only requests that satisfy all of them. Searching "foo,bar" queries only requests tagged both "foo" and "bar". Example: checkout,web.
    zip_codestring
    ZIP code of the address, as 81073, 810731119 or 81073-1119. Example: 81073.