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

# Retry an Upload request

> If there were any errors during the upload process, this endpoint will retry the upload request. In some cases this will reattempt the existing upload request, in other cases it may create a new upload request. Please check the ticket_id in the response to determine if a new upload request was created.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/external-connects.yml post /external_connections/{id}/uploads/{ticket_id}/retry
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/{ticket_id}/retry:
    post:
      tags:
        - External Connections
      summary: Retry an Upload request
      description: >-
        If there were any errors during the upload process, this endpoint will
        retry the upload request. In some cases this will reattempt the existing
        upload request, in other cases it may create a new upload request.
        Please check the ticket_id in the response to determine if a new upload
        request was created.
      operationId: RetryUpload
      parameters:
        - $ref: '#/components/parameters/external-voice-integrations_id'
        - $ref: '#/components/parameters/ticket_id'
      responses:
        '202':
          $ref: '#/components/responses/GetUploadResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '409':
          description: Order is still in progress, please wait before retrying
        '422':
          description: Unprocessable Entity
      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 response = await client.externalConnections.uploads.retry(
              '7b6a6449-b055-45a6-81f6-f6f0dffa4cc6',
              { id: '1293384261075731499' },
            );

            console.log(response.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
            )
            response = client.external_connections.uploads.retry(
                ticket_id="7b6a6449-b055-45a6-81f6-f6f0dffa4cc6",
                id="1293384261075731499",
            )
            print(response.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\tresponse, err := client.ExternalConnections.Uploads.Retry(\n\t\tcontext.TODO(),\n\t\t\"7b6a6449-b055-45a6-81f6-f6f0dffa4cc6\",\n\t\ttelnyx.ExternalConnectionUploadRetryParams{\n\t\t\tID: \"1293384261075731499\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.uploads.UploadRetryParams;

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


            public final class Main {
                private Main() {}

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

                    UploadRetryParams params = UploadRetryParams.builder()
                        .id("1293384261075731499")
                        .ticketId("7b6a6449-b055-45a6-81f6-f6f0dffa4cc6")
                        .build();
                    UploadRetryResponse response = client.externalConnections().uploads().retry(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            response = telnyx.external_connections.uploads.retry_(
              "7b6a6449-b055-45a6-81f6-f6f0dffa4cc6",
              id: "1293384261075731499"
            )

            puts(response)
        - lang: CLI
          source: |-
            telnyx external-connections:uploads retry \
              --api-key 'My API Key' \
              --id 1293384261075731499 \
              --ticket-id 7b6a6449-b055-45a6-81f6-f6f0dffa4cc6
components:
  parameters:
    external-voice-integrations_id:
      name: id
      description: Identifies the resource.
      in: path
      required: true
      schema:
        type: string
        example: '1293384261075731499'
        x-format: int64
    ticket_id:
      name: ticket_id
      description: Identifies an Upload request
      in: path
      required: true
      schema:
        format: uuid
        type: string
        example: 7b6a6449-b055-45a6-81f6-f6f0dffa4cc6
  responses:
    GetUploadResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            title: Get Upload Response
            properties:
              data:
                $ref: '#/components/schemas/Upload'
  schemas:
    Upload:
      type: object
      title: Upload
      properties:
        ticket_id:
          $ref: '#/components/schemas/UUID'
        tenant_id:
          type: string
          format: uuid
          example: ea175aba-f47c-4702-9400-efaa42688048
        location_id:
          type: string
          format: uuid
          example: c37e5036-1e87-42e6-86a2-b3e8dd39a2ad
        status:
          type: string
          enum:
            - pending_upload
            - pending
            - in_progress
            - partial_success
            - success
            - error
          description: Represents the status of the upload on Microsoft Teams.
          example: error
          default: pending_upload
        available_usages:
          type: array
          items:
            type: string
            enum:
              - calling_user_assignment
              - first_party_app_assignment
            description: Available usages for the numbers in the upload on Microsoft Teams.
        error_code:
          type: string
          description: >-
            A code returned by Microsoft Teams if there is an error with the
            upload process.
        error_message:
          type: string
          description: A message set if there is an error with the upload process.
        tn_upload_entries:
          type: array
          items:
            $ref: '#/components/schemas/TnUploadEntry'
    UUID:
      title: UUID
      type: string
      format: uuid
      description: Uniquely identifies the resource.
      example: 542c3bca-d247-42bc-8fe7-e01d16ecd761
    TnUploadEntry:
      type: object
      title: TnUploadEntry
      properties:
        number_id:
          $ref: '#/components/schemas/UUID'
        phone_number:
          type: string
          description: Phone number in E164 format.
        status:
          type: string
          enum:
            - pending_upload
            - pending
            - in_progress
            - success
            - error
          description: >-
            Represents the status of the phone number entry upload on Microsoft
            Teams.
          example: error
          default: pending_upload
        error_code:
          type: string
          enum:
            - internal_error
            - unable_to_retrieve_default_location
            - unknown_country_code
            - unable_to_retrieve_location
            - unable_to_retrieve_partner_info
            - unable_to_match_geography_entry
          description: >-
            A code returned by Microsoft Teams if there is an error with the
            phone number entry upload.
          example: internal_error
        error_message:
          type: string
          description: >-
            A message returned by Microsoft Teams if there is an error with the
            upload process.
        civic_address_id:
          type: string
          format: uuid
          description: Identifies the civic address assigned to the phone number entry.
        location_id:
          type: string
          format: uuid
          description: Identifies the location assigned to the phone number entry.
        internal_status:
          type: string
          enum:
            - pending_assignment
            - in_progress
            - all_internal_jobs_completed
            - release_requested
            - release_completed
            - error
          description: Represents the status of the phone number entry upload on Telnyx.
          example: error
          default: pending_assignment
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````