> ## 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 an Upload request

> Creates a new Upload request to Microsoft teams with the included phone numbers. Only one of civic_address_id or location_id must be provided, not both. The maximum allowed phone numbers for the numbers_ids array is 1000.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/external-connects.yml post /external_connections/{id}/uploads
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}/uploads:
    post:
      tags:
        - External Connections
      summary: Creates an Upload request
      description: >-
        Creates a new Upload request to Microsoft teams with the included phone
        numbers. Only one of civic_address_id or location_id must be provided,
        not both. The maximum allowed phone numbers for the numbers_ids array is
        1000.
      operationId: CreateExternalConnectionUpload
      parameters:
        - $ref: '#/components/parameters/external-voice-integrations_id'
      requestBody:
        description: Parameters that can be set when creating an Upload request.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateExternalConnectionUploadRequest'
      responses:
        '202':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                title: Create Upload request Response
                properties:
                  success:
                    type: boolean
                    description: Describes wether or not the operation was successful
                  ticket_id:
                    type: string
                    format: uuid
                    description: Ticket id of the upload request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '413':
          description: >-
            Payload too large. The maximum allowed phone numbers for the
            numbers_ids array is 1000.
        '422':
          description: Unprocessable Entity
        '504':
          description: Gateway Timeout
      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 upload = await
            client.externalConnections.uploads.create('1293384261075731499', {
              number_ids: [
                '3920457616934164700',
                '3920457616934164701',
                '3920457616934164702',
                '3920457616934164703',
              ],
            });


            console.log(upload.ticket_id);
        - 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
            )
            upload = client.external_connections.uploads.create(
                id="1293384261075731499",
                number_ids=["3920457616934164700", "3920457616934164701", "3920457616934164702", "3920457616934164703"],
            )
            print(upload.ticket_id)
        - 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\tupload, err := client.ExternalConnections.Uploads.New(\n\t\tcontext.TODO(),\n\t\t\"1293384261075731499\",\n\t\ttelnyx.ExternalConnectionUploadNewParams{\n\t\t\tNumberIDs: []string{\"3920457616934164700\", \"3920457616934164701\", \"3920457616934164702\", \"3920457616934164703\"},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", upload.TicketID)\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.uploads.UploadCreateParams;

            import
            com.telnyx.sdk.models.externalconnections.uploads.UploadCreateResponse;

            import java.util.List;


            public final class Main {
                private Main() {}

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

                    UploadCreateParams params = UploadCreateParams.builder()
                        .id("1293384261075731499")
                        .numberIds(List.of(
                          "3920457616934164700",
                          "3920457616934164701",
                          "3920457616934164702",
                          "3920457616934164703"
                        ))
                        .build();
                    UploadCreateResponse upload = client.externalConnections().uploads().create(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            upload = telnyx.external_connections.uploads.create(
              "1293384261075731499",
              number_ids: ["3920457616934164700", "3920457616934164701", "3920457616934164702", "3920457616934164703"]
            )

            puts(upload)
        - lang: CLI
          source: |-
            telnyx external-connections:uploads create \
              --api-key 'My API Key' \
              --id 1293384261075731499 \
              --number-id "'3920457616934164700'" \
              --number-id "'3920457616934164701'" \
              --number-id "'3920457616934164702'" \
              --number-id "'3920457616934164703'"
components:
  parameters:
    external-voice-integrations_id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
        x-format: int64
  schemas:
    CreateExternalConnectionUploadRequest:
      type: object
      title: Create Upload Request
      required:
        - number_ids
      properties:
        number_ids:
          type: array
          items:
            type: string
            description: Phone number ID from the Telnyx API.
          minItems: 1
        usage:
          type: string
          enum:
            - calling_user_assignment
            - first_party_app_assignment
          description: >-
            The use case of the upload request. NOTE: `calling_user_assignment`
            is not supported for toll free numbers.
        additional_usages:
          type: array
          items:
            type: string
            enum:
              - calling_user_assignment
              - first_party_app_assignment
            description: >-
              Additional use cases of the upload request. If not provided, all
              supported usages will be used.
        location_id:
          type: string
          format: uuid
          description: Identifies the location to assign all phone numbers to.
        civic_address_id:
          type: string
          format: uuid
          description: Identifies the civic address to assign all phone numbers to.
      example:
        number_ids:
          - '3920457616934164700'
          - '3920457616934164701'
          - '3920457616934164702'
          - '3920457616934164703'
        usage: first_party_app_assignment
        location_id: 67ea7693-9cd5-4a68-8c76-abb3aa5bf5d2
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````