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

# Creates a user address

> Creates a user address.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/account-billing/taggings.yml post /user/addresses
openapi: 3.1.0
info:
  title: Telnyx Taggings API
  version: 2.0.0
  description: API for Taggings.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /user/addresses:
    post:
      tags:
        - UserAddresses
      summary: Creates a user address
      description: Creates a user address.
      operationId: CreateUserAddress
      parameters: []
      requestBody:
        description: Parameters that can be defined during user address creation
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserAddressCreate'
      responses:
        '200':
          $ref: '#/components/responses/UserAddressResponse'
        '422':
          description: Bad request
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const userAddress = await client.userAddresses.create({
              business_name: "Toy-O'Kon",
              country_code: 'US',
              first_name: 'Alfred',
              last_name: 'Foster',
              locality: 'Austin',
              street_address: '600 Congress Avenue',
            });

            console.log(userAddress.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            user_address = client.user_addresses.create(
                business_name="Toy-O'Kon",
                country_code="US",
                first_name="Alfred",
                last_name="Foster",
                locality="Austin",
                street_address="600 Congress Avenue",
            )
            print(user_address.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tuserAddress, err := client.UserAddresses.New(context.TODO(), telnyx.UserAddressNewParams{\n\t\tBusinessName:  \"Toy-O'Kon\",\n\t\tCountryCode:   \"US\",\n\t\tFirstName:     \"Alfred\",\n\t\tLastName:      \"Foster\",\n\t\tLocality:      \"Austin\",\n\t\tStreetAddress: \"600 Congress Avenue\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", userAddress.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import com.telnyx.sdk.models.useraddresses.UserAddressCreateParams;

            import
            com.telnyx.sdk.models.useraddresses.UserAddressCreateResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    UserAddressCreateParams params = UserAddressCreateParams.builder()
                        .businessName("Toy-O'Kon")
                        .countryCode("US")
                        .firstName("Alfred")
                        .lastName("Foster")
                        .locality("Austin")
                        .streetAddress("600 Congress Avenue")
                        .build();
                    UserAddressCreateResponse userAddress = client.userAddresses().create(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            user_address = telnyx.user_addresses.create(
              business_name: "Toy-O'Kon",
              country_code: "US",
              first_name: "Alfred",
              last_name: "Foster",
              locality: "Austin",
              street_address: "600 Congress Avenue"
            )

            puts(user_address)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $userAddress = $client->userAddresses->create(
                businessName: 'Toy-O\'Kon',
                countryCode: 'US',
                firstName: 'Alfred',
                lastName: 'Foster',
                locality: 'Austin',
                streetAddress: '600 Congress Avenue',
                administrativeArea: 'TX',
                borough: 'Guadalajara',
                customerReference: 'MY REF 001',
                extendedAddress: '14th Floor',
                neighborhood: 'Ciudad de los deportes',
                phoneNumber: '+12125559000',
                postalCode: '78701',
                skipAddressVerification: true,
              );

              var_dump($userAddress);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx user-addresses create \
              --api-key 'My API Key' \
              --business-name "Toy-O'Kon" \
              --country-code US \
              --first-name Alfred \
              --last-name Foster \
              --locality Austin \
              --street-address '600 Congress Avenue'
components:
  schemas:
    UserAddressCreate:
      type: object
      required:
        - first_name
        - last_name
        - business_name
        - street_address
        - locality
        - country_code
      properties:
        customer_reference:
          $ref: '#/components/schemas/customer_reference'
        first_name:
          $ref: '#/components/schemas/user-addresses_first_name'
        last_name:
          $ref: '#/components/schemas/user-addresses_last_name'
        business_name:
          $ref: '#/components/schemas/user-addresses_business_name'
        phone_number:
          $ref: '#/components/schemas/user-addresses_phone_number'
        street_address:
          $ref: '#/components/schemas/user-addresses_street_address'
        extended_address:
          $ref: '#/components/schemas/user-addresses_extended_address'
        locality:
          $ref: '#/components/schemas/user-addresses_locality'
        administrative_area:
          $ref: '#/components/schemas/user-addresses_administrative_area'
        neighborhood:
          $ref: '#/components/schemas/user-addresses_neighborhood'
        borough:
          $ref: '#/components/schemas/user-addresses_borough'
        postal_code:
          $ref: '#/components/schemas/user-addresses_postal_code'
        country_code:
          $ref: '#/components/schemas/user-addresses_country_code'
        skip_address_verification:
          $ref: '#/components/schemas/skip_address_verification'
    customer_reference:
      type: string
      description: A customer reference string for customer look ups.
      example: MY REF 001
    user-addresses_first_name:
      type: string
      description: The first name associated with the user address.
      example: Alfred
    user-addresses_last_name:
      type: string
      description: The last name associated with the user address.
      example: Foster
    user-addresses_business_name:
      type: string
      description: The business name associated with the user address.
      example: Toy-O'Kon
    user-addresses_phone_number:
      type: string
      description: The phone number associated with the user address.
      example: '+12125559000'
    user-addresses_street_address:
      type: string
      description: The primary street address information about the user address.
      example: 600 Congress Avenue
    user-addresses_extended_address:
      type: string
      description: >-
        Additional street address information about the user address such as,
        but not limited to, unit number or apartment number.
      example: 14th Floor
    user-addresses_locality:
      type: string
      description: >-
        The locality of the user address. For US addresses, this corresponds to
        the city of the address.
      example: Austin
    user-addresses_administrative_area:
      type: string
      description: >-
        The locality of the user address. For US addresses, this corresponds to
        the state of the address.
      example: TX
    user-addresses_neighborhood:
      type: string
      description: >-
        The neighborhood of the user address. This field is not used for
        addresses in the US but is used for some international addresses.
      example: Ciudad de los deportes
    user-addresses_borough:
      type: string
      description: >-
        The borough of the user address. This field is not used for addresses in
        the US but is used for some international addresses.
      example: Guadalajara
    user-addresses_postal_code:
      type: string
      description: The postal code of the user address.
      example: '78701'
    user-addresses_country_code:
      type: string
      description: The two-character (ISO 3166-1 alpha-2) country code of the user address.
      example: US
    skip_address_verification:
      type: boolean
      description: >-
        An optional boolean value specifying if verification of the address
        should be skipped or not. UserAddresses are generally used for shipping
        addresses, and failure to validate your shipping address will likely
        result in a failure to deliver SIM cards or other items ordered from
        Telnyx. Do not use this parameter unless you are sure that the address
        is correct even though it cannot be validated. If this is set to any
        value other than true, verification of the address will be attempted,
        and the user address will not be allowed if verification fails. If
        verification fails but suggested values are available that might make
        the address correct, they will be present in the response as well. If
        this value is set to true, then the verification will not be attempted.
        Defaults to false (verification will be performed).
      default: false
    UserAddress:
      type: object
      title: UserAddress
      properties:
        id:
          type: string
          format: uuid
          description: Uniquely identifies the user address.
          example: c3527e69-dc5a-4b3e-8f44-99d209f83c1d
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: user_address
        customer_reference:
          $ref: '#/components/schemas/customer_reference'
        first_name:
          $ref: '#/components/schemas/user-addresses_first_name'
        last_name:
          $ref: '#/components/schemas/user-addresses_last_name'
        business_name:
          $ref: '#/components/schemas/user-addresses_business_name'
        phone_number:
          $ref: '#/components/schemas/user-addresses_phone_number'
        street_address:
          $ref: '#/components/schemas/user-addresses_street_address'
        extended_address:
          $ref: '#/components/schemas/user-addresses_extended_address'
        locality:
          $ref: '#/components/schemas/user-addresses_locality'
        administrative_area:
          $ref: '#/components/schemas/user-addresses_administrative_area'
        neighborhood:
          $ref: '#/components/schemas/user-addresses_neighborhood'
        borough:
          $ref: '#/components/schemas/user-addresses_borough'
        postal_code:
          $ref: '#/components/schemas/user-addresses_postal_code'
        country_code:
          $ref: '#/components/schemas/user-addresses_country_code'
        created_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2018-02-02T22:25:27.521Z'
  responses:
    UserAddressResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/UserAddress'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````