> ## 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 list of additional documents

> Creates a list of additional documents for a porting order.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-documents.yml post /porting_orders/{id}/additional_documents
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_orders/{id}/additional_documents:
    post:
      tags:
        - Porting Orders
      summary: Create a list of additional documents
      description: Creates a list of additional documents for a porting order.
      operationId: CreateAdditionalDocuments
      parameters:
        - $ref: '#/components/parameters/PathPortingOrderID'
      requestBody:
        $ref: '#/components/requestBodies/CreatePortingAdditionalDocuments'
      responses:
        '201':
          $ref: '#/components/responses/CreatePortingAdditionalDocuments'
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity. Check message field in response for details.
      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 additionalDocument = await
            client.portingOrders.additionalDocuments.create(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );


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

            additional_document =
            client.porting_orders.additional_documents.create(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )

            print(additional_document.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\tadditionalDocument, err := client.PortingOrders.AdditionalDocuments.New(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.PortingOrderAdditionalDocumentNewParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", additionalDocument.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.portingorders.additionaldocuments.AdditionalDocumentCreateParams;

            import
            com.telnyx.sdk.models.portingorders.additionaldocuments.AdditionalDocumentCreateResponse;


            public final class Main {
                private Main() {}

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

                    AdditionalDocumentCreateResponse additionalDocument = client.portingOrders().additionalDocuments().create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            additional_document =
            telnyx.porting_orders.additional_documents.create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(additional_document)
        - 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 {
              $additionalDocument = $client->portingOrders->additionalDocuments->create(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                additionalDocuments: [
                  [
                    'documentID' => '22771a52-c43a-4539-80db-9dd9ec36e237',
                    'documentType' => 'loa',
                  ],
                  [
                    'documentID' => 'd91474e6-4ebc-4ec1-b379-c596eeb405d6',
                    'documentType' => 'invoice',
                  ],
                ],
              );

              var_dump($additionalDocument);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx porting-orders:additional-documents create \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  parameters:
    PathPortingOrderID:
      name: id
      description: Porting Order id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  requestBodies:
    CreatePortingAdditionalDocuments:
      description: A list of additional document parameters
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              additional_documents:
                type: array
                maxItems: 100
                items:
                  type: object
                  properties:
                    document_type:
                      type: string
                      description: The type of document being created.
                      enum:
                        - loa
                        - invoice
                        - csr
                        - other
                    document_id:
                      type: string
                      description: The document identification
                      format: uuid
            example:
              additional_documents:
                - document_id: 22771a52-c43a-4539-80db-9dd9ec36e237
                  document_type: loa
                - document_id: d91474e6-4ebc-4ec1-b379-c596eeb405d6
                  document_type: invoice
  responses:
    CreatePortingAdditionalDocuments:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortingAdditionalDocument'
            example:
              data:
                - id: 2acd1061-33cb-49b8-8014-beb6dc3fedbf
                  document_id: 40bc547a-7f96-4cd5-926a-da4842671e88
                  document_type: loa
                  porting_order_id: 9d7b3b8e-4e67-4837-9c44-d110cd2c82a1
                  record_type: porting_additional_document
                  created_at: '2023-06-01T10:00:00.00000Z'
                  updated_at: '2023-06-01T10:00:00.00000Z'
  schemas:
    PortingAdditionalDocument:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies this additional document
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        document_type:
          type: string
          description: Identifies the type of additional document
          enum:
            - loa
            - invoice
            - csr
            - other
          example: loa
        document_id:
          type: string
          format: uuid
          description: Identifies the associated document
          example: f1486bae-f067-460c-ad43-73a92848f902
        filename:
          type: string
          description: The filename of the related document.
          example: file.txt
        content_type:
          type: string
          description: The content type of the related document.
          example: text/plain
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the associated porting order
          example: f1486bae-f067-460c-ad43-73a92848f902
        record_type:
          type: string
          example: porting_additional_document
          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

````