> ## 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.

# Create a dynamic emergency address.

> Creates a dynamic emergency address.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/emergency.yml post /dynamic_emergency_addresses
openapi: 3.1.0
info:
  title: Telnyx Emergency API
  version: 2.0.0
  description: API for Emergency.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /dynamic_emergency_addresses:
    post:
      tags:
        - Dynamic Emergency Addresses
      summary: Create a dynamic emergency address.
      description: Creates a dynamic emergency address.
      operationId: CreateDynamicEmergencyAddress
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DynamicEmergencyAddress'
      responses:
        '201':
          $ref: '#/components/responses/DynamicEmergencyAddressResponse'
        '400':
          $ref: '#/components/responses/emergency_BadRequestResponse'
        '401':
          $ref: '#/components/responses/emergency_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/emergency_NotFoundResponse'
        '422':
          $ref: '#/components/responses/emergency_UnprocessableEntity'
        '500':
          $ref: '#/components/responses/emergency_GenericErrorResponse'
      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 dynamicEmergencyAddress = await
            client.dynamicEmergencyAddresses.create({
              administrative_area: 'TX',
              country_code: 'US',
              house_number: '600',
              locality: 'Austin',
              postal_code: '78701',
              street_name: 'Congress',
            });


            console.log(dynamicEmergencyAddress.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
            )

            dynamic_emergency_address =
            client.dynamic_emergency_addresses.create(
                administrative_area="TX",
                country_code="US",
                house_number="600",
                locality="Austin",
                postal_code="78701",
                street_name="Congress",
            )

            print(dynamic_emergency_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\tdynamicEmergencyAddress, err := client.DynamicEmergencyAddresses.New(context.TODO(), telnyx.DynamicEmergencyAddressNewParams{\n\t\tDynamicEmergencyAddress: telnyx.DynamicEmergencyAddressParam{\n\t\t\tAdministrativeArea: \"TX\",\n\t\t\tCountryCode:        telnyx.DynamicEmergencyAddressCountryCodeUs,\n\t\t\tHouseNumber:        \"600\",\n\t\t\tLocality:           \"Austin\",\n\t\t\tPostalCode:         \"78701\",\n\t\t\tStreetName:         \"Congress\",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", dynamicEmergencyAddress.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.dynamicemergencyaddresses.DynamicEmergencyAddress;

            import
            com.telnyx.sdk.models.dynamicemergencyaddresses.DynamicEmergencyAddressCreateResponse;


            public final class Main {
                private Main() {}

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

                    DynamicEmergencyAddress params = DynamicEmergencyAddress.builder()
                        .administrativeArea("TX")
                        .countryCode(DynamicEmergencyAddress.CountryCode.US)
                        .houseNumber("600")
                        .locality("Austin")
                        .postalCode("78701")
                        .streetName("Congress")
                        .build();
                    DynamicEmergencyAddressCreateResponse dynamicEmergencyAddress = client.dynamicEmergencyAddresses().create(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            dynamic_emergency_address =
            telnyx.dynamic_emergency_addresses.create(
              administrative_area: "TX",
              country_code: :US,
              house_number: "600",
              locality: "Austin",
              postal_code: "78701",
              street_name: "Congress"
            )


            puts(dynamic_emergency_address)
        - lang: CLI
          source: |-
            telnyx dynamic-emergency-addresses create \
              --api-key 'My API Key' \
              --administrative-area TX \
              --country-code US \
              --house-number 600 \
              --locality Austin \
              --postal-code 78701 \
              --street-name Congress
components:
  schemas:
    DynamicEmergencyAddress:
      type: object
      properties:
        id:
          type: string
          example: 0ccc7b54-4df3-4bca-a65a-3da1ecc777f1
          readOnly: true
        record_type:
          type: string
          description: Identifies the type of the resource.
          readOnly: true
          example: dynamic_emergency_address
        sip_geolocation_id:
          type: string
          description: >-
            Unique location reference string to be used in SIP INVITE from /
            p-asserted headers.
          example: XYZ123
          readOnly: true
        status:
          type: string
          description: Status of dynamic emergency address
          readOnly: true
          enum:
            - pending
            - activated
            - rejected
          example: pending
        house_number:
          type: string
          example: '600'
        house_suffix:
          type: string
        street_pre_directional:
          type: string
        street_name:
          type: string
          example: Congress
        street_suffix:
          type: string
          example: St
        street_post_directional:
          type: string
        extended_address:
          type: string
        locality:
          type: string
          example: Austin
        administrative_area:
          type: string
          example: TX
        postal_code:
          type: string
          example: '78701'
        country_code:
          type: string
          example: US
          enum:
            - US
            - CA
            - PR
        created_at:
          type: string
          description: ISO 8601 formatted date of when the resource was created
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          description: ISO 8601 formatted date of when the resource was last updated
          readOnly: true
          example: '2018-02-02T22:25:27.521Z'
      required:
        - house_number
        - street_name
        - locality
        - administrative_area
        - postal_code
        - country_code
    emergency_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/emergency_Error'
      type: object
    emergency_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  responses:
    DynamicEmergencyAddressResponse:
      description: Dynamic Emergency Address Response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/DynamicEmergencyAddress'
    emergency_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/emergency_Errors'
    emergency_UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/emergency_Errors'
    emergency_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/emergency_Errors'
    emergency_UnprocessableEntity:
      description: Unprocessable entity. Check the 'detail' field in response for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/emergency_Errors'
    emergency_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/emergency_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````