> ## Documentation Index
> Fetch the complete documentation index at: https://telnesstech-a0a16404.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate address

> Validate an address and get suggestions for corrections if the address is invalid.

This is particularly important for US addresses where precise addressing is required
for service delivery and regulatory compliance.

Depending on setup, address validation is either shape based (e.g. this looks like an address),
or verified against an address registry.




## OpenAPI

````yaml /api-reference/bundled_openapi.json post /tools/validate-address
openapi: 3.1.0
info:
  title: Telness Tech Connect
  version: 2.0.0-alpha
  description: >
    Telness Tech Connect API provides all you need to own your user's
    connectivity experience.


    Go back to [Telnesstech.com](https://telnesstech.com)
servers:
  - url: https://apiv2.example.com
    description: Connect API URL for your domain
security:
  - apiKey: []
  - bearerAuth: []
    apiKey: []
tags:
  - name: Auth
    description: Authenticate users and obtain access tokens.
  - name: Users
    description: Manage users.
  - name: Customers
    description: Manage customers.
  - name: Subscriptions
    description: Manage subscriptions and subscription.
  - name: Subscription Addons
    description: Manage subscription addons.
  - name: Subscription Usage
    description: Get subscription usage.
  - name: Subscribers
    description: Manage subscribers.
  - name: Licenses
    description: Manage licenses.
  - name: Product Offerings
    description: Browse product offerings.
  - name: Product Catalogs
    description: Browse product catalogs.
  - name: Product Discounts
    description: Discounts and promotions.
  - name: Orders
    description: Manage orders and line items.
  - name: Payment Intents
    description: >-
      Inspect payment intents, the money collected over card rails for orders
      and renewals.
  - name: Payment Links
    description: Create and manage payment links for orders and invoices.
  - name: Payment Sessions
    description: Create and manage payment sessions for orders.
  - name: Payment Profiles
    description: Manage customer payment profiles and methods.
  - name: Payment Profile Sessions
    description: Create sessions for setting up payment profiles.
  - name: Signing sessions
    description: Handle contract signing sessions for postpaid orders.
  - name: Porting
    description: Manage number porting for subscriptions.
  - name: Taxes
    description: Calculate taxes for products and line items.
  - name: Invoices
    description: Manage invoices and invoice items.
  - name: Tools
    description: >-
      Tools for address validation, number porting, device info, and network
      coverage.
  - name: Inventory
    description: Manage phone number inventory, SIM cards, and reservations.
  - name: Workflows
    description: Dynamic processing of customer journeys and events.
paths:
  /tools/validate-address:
    post:
      tags:
        - Tools
      summary: Validate address
      description: >
        Validate an address and get suggestions for corrections if the address
        is invalid.


        This is particularly important for US addresses where precise addressing
        is required

        for service delivery and regulatory compliance.


        Depending on setup, address validation is either shape based (e.g. this
        looks like an address),

        or verified against an address registry.
      operationId: validateAddress
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateAddressRequest'
      responses:
        '200':
          description: Address validation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressValidationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    IdempotencyKey:
      in: header
      name: X-Idempotency-Key
      required: false
      description: >
        A unique key to ensure idempotency of requests. If a request with the
        same key has already been processed, the same result will be returned.

        The key must be unique for each distinct operation. Keys are expired
        after 24 hours, but we recommend using a new key for each request.


        Modified requests with the same idempotency keys are rejected with a
        `409 Conflict` status code.
      schema:
        type: string
        maxLength: 256
  schemas:
    ValidateAddressRequest:
      type: object
      description: Request to validate an address.
      required:
        - address
      additionalProperties: false
      properties:
        address:
          $ref: '#/components/schemas/Address'
    AddressValidationResult:
      type: object
      description: >
        Result of address validation with optional suggestions.


        Depending on setup, address validation is either shape based (e.g. this
        looks like an address),

        or verified against an address registry.
      required:
        - valid
      additionalProperties: false
      properties:
        valid:
          type: boolean
          description: Whether the provided address is valid.
          example: false
        suggestedAddress:
          $ref: '#/components/schemas/Address'
          description: >
            If provided, a suggestion for a corrected address by the underlying
            address validation service.


            Do note that this may be returned for seemingly valid addresses,
            where the network has a more precise or standardized version of the
            address.

            A typical example of this is the address is found in the networks'
            registry but under a different name because it contains aliases or
            minor formatting issues, mistyped zip codes, etc.
        validationDetails:
          type: object
          description: Additional validation details.
          additionalProperties: false
          properties:
            issues:
              type: array
              description: Specific issues found with the address.
              items:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
                    description: Description of the issue found.
                  property:
                    type: string
                    description: >-
                      The property or field related to the issue (e.g.,
                      "street", "zipCode").
          example:
            issues:
              - message: Missing city
                property: city
              - message: Invalid zip format
                property: zip
    Address:
      type: object
      required:
        - street1
        - city
        - zip
        - country
      properties:
        street1:
          type: string
          description: The first line of the address, typically street and house number.
          example: 500 S Main St
        street2:
          type: string
          description: >-
            The second line of the address, typically apartment, suite, unit,
            building, floor, etc.
          example: Apt 1
        city:
          type: string
          description: The city or municipality of the address.
          example: Natick
        zip:
          type: string
          description: >
            The zip code of the address.


            Depending on the country, this may be referred to as a postal code
            or postcode.


            Specifically for US addresses, the zip can include the optional
            four-digit extension (e.g., '27604-5121').
          example: '01701'
        country:
          type: string
          description: >-
            The two-letter country abbreviation (e.g., 'US' for United States,
            'SE' for Sweden).
          pattern: ^[A-Z]{2}$
          example: US
        state:
          type: string
          description: >-
            For countries that use states or regions, the state or
            administrative area code (e.g., 'CA' for California in the United
            States).
          example: CA
        region:
          type: string
          description: >-
            A province, region, or territory name, applicable in certain
            countries (e.g., 'Ontario' in Canada, 'Sindh' in Pakistan).
        attention:
          type: string
          description: >-
            An optional line for specifying a person, department, or attention
            to a specific entity within an address.
    Error:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          description: A human-readable message providing more details about the error.
        code:
          type: string
          description: A machine-readable code for the error.
        details:
          type: array
          description: Additional details about the error.
          items:
            type: object
            required:
              - message
              - code
            properties:
              message:
                type: string
                description: >-
                  A human-readable message providing more details about the
                  error.
              code:
                type: string
                description: A machine-readable code for the specific detail.
              property:
                type: string
                description: The property or field related to the error.
              suggestion:
                $ref: '#/components/schemas/Any'
                description: >
                  A suggested value for the particular property.


                  For example, this may be set when validating an address with
                  an alias, suggesting the expected value by the operator.
        hint:
          type: string
          description: A hint to help resolve the error.
    Any:
      oneOf:
        - type: string
        - type: number
        - type: boolean
        - type: object
          additionalProperties: true
        - type: array
  responses:
    BadRequest:
      description: The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is required to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Access to this resource is forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too many requests have been sent in a given amount of time.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >
        An API key that grants access to the Connect API. You can create and
        manage API keys in the portal.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Bearer authentication with JWT tokens is used to authenticate users.


        Do note that a valid API keys is also required to access the Connect API
        to prove that requests are made by a trusted party.


        Requests with a JWT token is scoped to the permissions of the user the
        token belongs to, regardless of the API key used.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.