> ## 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 LOA configuration

> Create a LOA configuration.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-documents.yml post /porting/loa_configurations
openapi: 3.1.0
info:
  title: Telnyx Porting Documents API
  version: 2.0.0
  description: API for LOA configurations, templates, and additional documents.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting/loa_configurations:
    post:
      tags:
        - Porting Orders
      summary: Create a LOA configuration
      description: Create a LOA configuration.
      operationId: CreateLoaConfiguration
      requestBody:
        $ref: '#/components/requestBodies/CreatePortingLOAConfiguration'
      responses:
        '201':
          $ref: '#/components/responses/CreatePortingLOAConfiguration'
        '422':
          description: Unprocessable entity. Check message field in response for details.
        '500':
          description: Internal server error
      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 loaConfiguration = await
            client.porting.loaConfigurations.create({
              address: {
                city: 'Austin',
                country_code: 'US',
                state: 'TX',
                street_address: '600 Congress Avenue',
                zip_code: '78701',
              },
              company_name: 'Telnyx',
              contact: { email: 'testing@telnyx.com', phone_number: '+12003270001' },
              logo: { document_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
              name: 'My LOA Configuration',
            });


            console.log(loaConfiguration.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
            )
            loa_configuration = client.porting.loa_configurations.create(
                address={
                    "city": "Austin",
                    "country_code": "US",
                    "state": "TX",
                    "street_address": "600 Congress Avenue",
                    "zip_code": "78701",
                },
                company_name="Telnyx",
                contact={
                    "email": "testing@telnyx.com",
                    "phone_number": "+12003270001",
                },
                logo={
                    "document_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
                },
                name="My LOA Configuration",
            )
            print(loa_configuration.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\tloaConfiguration, err := client.Porting.LoaConfigurations.New(context.TODO(), telnyx.PortingLoaConfigurationNewParams{\n\t\tAddress: telnyx.PortingLoaConfigurationNewParamsAddress{\n\t\t\tCity:          \"Austin\",\n\t\t\tCountryCode:   \"US\",\n\t\t\tState:         \"TX\",\n\t\t\tStreetAddress: \"600 Congress Avenue\",\n\t\t\tZipCode:       \"78701\",\n\t\t},\n\t\tCompanyName: \"Telnyx\",\n\t\tContact: telnyx.PortingLoaConfigurationNewParamsContact{\n\t\t\tEmail:       \"testing@telnyx.com\",\n\t\t\tPhoneNumber: \"+12003270001\",\n\t\t},\n\t\tLogo: telnyx.PortingLoaConfigurationNewParamsLogo{\n\t\t\tDocumentID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\t},\n\t\tName: \"My LOA Configuration\",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", loaConfiguration.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.porting.loaconfigurations.LoaConfigurationCreateParams;

            import
            com.telnyx.sdk.models.porting.loaconfigurations.LoaConfigurationCreateResponse;


            public final class Main {
                private Main() {}

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

                    LoaConfigurationCreateParams params = LoaConfigurationCreateParams.builder()
                        .address(LoaConfigurationCreateParams.Address.builder()
                            .city("Austin")
                            .countryCode("US")
                            .state("TX")
                            .streetAddress("600 Congress Avenue")
                            .zipCode("78701")
                            .build())
                        .companyName("Telnyx")
                        .contact(LoaConfigurationCreateParams.Contact.builder()
                            .email("testing@telnyx.com")
                            .phoneNumber("+12003270001")
                            .build())
                        .logo(LoaConfigurationCreateParams.Logo.builder()
                            .documentId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                            .build())
                        .name("My LOA Configuration")
                        .build();
                    LoaConfigurationCreateResponse loaConfiguration = client.porting().loaConfigurations().create(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            loa_configuration = telnyx.porting.loa_configurations.create(
              address: {city: "Austin", country_code: "US", state: "TX", street_address: "600 Congress Avenue", zip_code: "78701"},
              company_name: "Telnyx",
              contact: {email: "testing@telnyx.com", phone_number: "+12003270001"},
              logo: {document_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},
              name: "My LOA Configuration"
            )

            puts(loa_configuration)
        - lang: CLI
          source: |-
            telnyx porting:loa-configurations create \
              --api-key 'My API Key' \
              --address "{city: Austin, country_code: US, state: TX, street_address: 600 Congress Avenue, zip_code: '78701'}" \
              --company-name Telnyx \
              --contact "{email: testing@telnyx.com, phone_number: '+12003270001'}" \
              --logo '{document_id: 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e}' \
              --name 'My LOA Configuration'
components:
  requestBodies:
    CreatePortingLOAConfiguration:
      required: true
      content:
        application/json:
          schema:
            type: object
            description: The parameters for creating a new LOA configuration.
            required:
              - name
              - logo
              - company_name
              - address
              - contact
            properties:
              name:
                type: string
                description: The name of the LOA configuration
                example: My LOA Configuration
              logo:
                type: object
                description: The logo of the LOA configuration
                required:
                  - document_id
                properties:
                  document_id:
                    type: string
                    description: The document identification
                    format: uuid
              company_name:
                type: string
                description: The name of the company
                example: Telnyx
              address:
                type: object
                description: The address of the company.
                required:
                  - street_address
                  - city
                  - state
                  - zip_code
                  - country_code
                properties:
                  street_address:
                    type: string
                    description: The street address of the company
                    example: 600 Congress Avenue
                  extended_address:
                    type: string
                    description: The extended address of the company
                    example: 14th Floor
                  city:
                    type: string
                    description: The locality of the company
                    example: Austin
                  state:
                    type: string
                    description: The administrative area of the company
                    example: TX
                    pattern: ^[A-Z]{2}$
                  zip_code:
                    type: string
                    description: The postal code of the company
                    example: '78701'
                    pattern: ^[0-9]{5}(?:-[0-9]{4})?$
                  country_code:
                    type: string
                    description: The country code of the company
                    example: US
                    pattern: ^[A-Z]{2}$
              contact:
                type: object
                description: The contact information of the company.
                required:
                  - email
                  - phone_number
                properties:
                  email:
                    type: string
                    description: The email address of the contact
                    example: testing@telnyx.com
                  phone_number:
                    type: string
                    description: The phone number of the contact
                    example: '+12003270001'
                    pattern: ^\+\d{11,15}$
  responses:
    CreatePortingLOAConfiguration:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/PortingLOAConfiguration'
  schemas:
    PortingLOAConfiguration:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the LOA configuration.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        company_name:
          type: string
          description: The name of the company
          example: Telnyx
        organization_id:
          type: string
          description: The organization that owns the LOA configuration
          example: f1486bae-f067-460c-ad43-73a92848f902
        name:
          type: string
          description: The name of the LOA configuration
          example: My LOA Configuration
        logo:
          type: object
          description: The logo to be used in the LOA.
          properties:
            document_id:
              type: string
              format: uuid
              description: Identifies the document that contains the logo.
              example: f1486bae-f067-460c-ad43-73a92848f902
            content_type:
              type: string
              description: The content type of the logo.
              enum:
                - image/png
              example: image/png
        address:
          type: object
          description: The address of the company.
          properties:
            street_address:
              type: string
              description: The street address of the company
              example: 600 Congress Avenue
            extended_address:
              type: string
              description: The extended address of the company
              example: 14th Floor
            city:
              type: string
              description: The locality of the company
              example: Austin
            state:
              type: string
              description: The administrative area of the company
              example: TX
              pattern: ^[A-Z]{2}$
            zip_code:
              type: string
              description: The postal code of the company
              example: '78701'
              pattern: ^[0-9]{5}(?:-[0-9]{4})?$
            country_code:
              type: string
              description: The country code of the company
              example: US
              pattern: ^[A-Z]{2}$
        contact:
          type: object
          description: The contact information of the company.
          properties:
            email:
              type: string
              description: The email address of the contact
              example: testing@telnyx.com
            phone_number:
              type: string
              description: The phone number of the contact
              example: '+12003270001'
              pattern: ^\+\d{11,15}$
        record_type:
          type: string
          example: porting_loa_configuration
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````