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

# List all civic addresses and locations

> Returns the civic addresses and locations from Microsoft Teams.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/external-connects.yml get /external_connections/{id}/civic_addresses
openapi: 3.1.0
info:
  title: Telnyx External Connects API
  version: 2.0.0
  description: API for External connects.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /external_connections/{id}/civic_addresses:
    get:
      tags:
        - External Connections
      summary: List all civic addresses and locations
      description: Returns the civic addresses and locations from Microsoft Teams.
      operationId: ListCivicAddresses
      parameters:
        - $ref: '#/components/parameters/external-voice-integrations_id'
        - $ref: '#/components/parameters/FilterCivicAddressesConsolidated'
      responses:
        '200':
          $ref: '#/components/responses/GetAllCivicAddressesResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Unexpected Error
        '502':
          description: Bad Gateway
      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 civicAddresses = await
            client.externalConnections.civicAddresses.list('1293384261075731499');


            console.log(civicAddresses.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
            )
            civic_addresses = client.external_connections.civic_addresses.list(
                id="1293384261075731499",
            )
            print(civic_addresses.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\tcivicAddresses, err := client.ExternalConnections.CivicAddresses.List(\n\t\tcontext.TODO(),\n\t\t\"1293384261075731499\",\n\t\ttelnyx.ExternalConnectionCivicAddressListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", civicAddresses.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.externalconnections.civicaddresses.CivicAddressListParams;

            import
            com.telnyx.sdk.models.externalconnections.civicaddresses.CivicAddressListResponse;


            public final class Main {
                private Main() {}

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

                    CivicAddressListResponse civicAddresses = client.externalConnections().civicAddresses().list("1293384261075731499");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            civic_addresses =
            telnyx.external_connections.civic_addresses.list("1293384261075731499")


            puts(civic_addresses)
        - 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 {
              $civicAddresses = $client->externalConnections->civicAddresses->list(
                '1293384261075731499', filter: ['country' => ['US', 'CA', 'MX', 'BR']]
              );

              var_dump($civicAddresses);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx external-connections:civic-addresses list \
              --api-key 'My API Key' \
              --id 1293384261075731499
components:
  parameters:
    external-voice-integrations_id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
        x-format: int64
    FilterCivicAddressesConsolidated:
      name: filter
      in: query
      style: deepObject
      explode: true
      description: >-
        Filter parameter for civic addresses (deepObject style). Supports
        filtering by country.
      schema:
        type: object
        properties:
          country:
            type: array
            example:
              - US
              - CA
              - MX
              - BR
            items:
              type: string
              description: The ISO 3166-1 alpha-2 country code (2 characters)
            description: The country (or countries) to filter addresses by.
  responses:
    GetAllCivicAddressesResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            title: Get All Civic Addresses Response
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/CivicAddress'
  schemas:
    CivicAddress:
      type: object
      title: Civic Address
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        record_type:
          type: string
          description: Identifies the type of the resource.
          example: civic_address
        city_or_town:
          type: string
          example: Chicago
        city_or_town_alias:
          type: string
        company_name:
          type: string
          example: Telnyx
        country:
          type: string
          example: US
        country_or_district:
          type: string
          example: US
        default_location_id:
          type: string
          format: uuid
          description: Identifies what is the default location in the list of locations.
        description:
          type: string
          example: Texas Office
        house_number:
          type: string
          example: '600'
        house_number_suffix:
          type: string
        postal_or_zip_code:
          type: string
          example: '78701'
        state_or_province:
          type: string
          example: TX
        street_name:
          type: string
          example: Congress
        street_suffix:
          type: string
          example: St
        locations:
          type: array
          items:
            $ref: '#/components/schemas/Location'
      example:
        id: 07a4dc5d-9b3b-4ba2-88a4-6ba172316c65
        record_type: civic_address
        city_or_town: Austin
        city_or_town_alias: ''
        company_name: Telnyx
        country: US
        country_or_district: US
        default_location_id: 18ded4bb-b694-44c1-a89b-a35b7acd4c9e
        description: Austin Office
        house_number: '600'
        house_number_suffix: ''
        locations:
          - id: 18ded4bb-b694-44c1-a89b-a35b7acd4c9e
            additional_info: ''
            description: Austin Office
            is_default: true
          - id: d420a57f-c4ae-4697-87e1-fbefd9e86f72
            additional_info: 14th Floor
            description: ''
            is_default: false
        postal_or_zip_code: '78701'
        state_or_province: TX
        street_name: Congress Street
        street_suffix: ''
    UUID:
      title: UUID
      type: string
      format: uuid
      description: Uniquely identifies the resource.
      example: 542c3bca-d247-42bc-8fe7-e01d16ecd761
    Location:
      type: object
      title: Location
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        additional_info:
          type: string
          example: 14th Floor
        description:
          type: string
          example: Austin Office
        is_default:
          type: boolean
          description: Represents whether the location is the default or not.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````