:doc:`ConnectCampaignServiceV2 <../../connectcampaignsv2>` / Client / put_outbound_request_batch

**************************
put_outbound_request_batch
**************************



.. py:method:: ConnectCampaignServiceV2.Client.put_outbound_request_batch(**kwargs)

  

  Creates outbound requests for the specified campaign Amazon Connect account. This API is idempotent.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/connectcampaignsv2-2024-04-23/PutOutboundRequestBatch>`_  


  **Request Syntax**
  ::

    response = client.put_outbound_request_batch(
        id='string',
        outboundRequests=[
            {
                'clientToken': 'string',
                'expirationTime': datetime(2015, 1, 1),
                'channelSubtypeParameters': {
                    'telephony': {
                        'destinationPhoneNumber': 'string',
                        'attributes': {
                            'string': 'string'
                        },
                        'connectSourcePhoneNumber': 'string',
                        'answerMachineDetectionConfig': {
                            'enableAnswerMachineDetection': True|False,
                            'awaitAnswerMachinePrompt': True|False
                        },
                        'ringTimeout': 123
                    },
                    'sms': {
                        'destinationPhoneNumber': 'string',
                        'connectSourcePhoneNumberArn': 'string',
                        'templateArn': 'string',
                        'templateParameters': {
                            'string': 'string'
                        }
                    },
                    'email': {
                        'destinationEmailAddress': 'string',
                        'connectSourceEmailAddress': 'string',
                        'templateArn': 'string',
                        'templateParameters': {
                            'string': 'string'
                        }
                    },
                    'whatsApp': {
                        'destinationPhoneNumber': 'string',
                        'connectSourcePhoneNumberArn': 'string',
                        'templateArn': 'string',
                        'templateParameters': {
                            'string': 'string'
                        }
                    }
                }
            },
        ]
    )
    
  :type id: string
  :param id: **[REQUIRED]** 

    Identifier representing a Campaign

    

  
  :type outboundRequests: list
  :param outboundRequests: **[REQUIRED]** 

    A list of outbound requests.

    

  
    - *(dict) --* 

      An outbound request for a campaign.

      

    
      - **clientToken** *(string) --* **[REQUIRED]** 

        Client provided parameter used for idempotency. Its value must be unique for each request.

        

      
      - **expirationTime** *(datetime) --* **[REQUIRED]** 

        Timestamp with no UTC offset or timezone

        

      
      - **channelSubtypeParameters** *(dict) --* **[REQUIRED]** 

        ChannelSubtypeParameters for an outbound request

        .. note::    This is a Tagged Union structure. Only one of the     following top level keys can be set: ``telephony``, ``sms``, ``email``, ``whatsApp``. 

      
        - **telephony** *(dict) --* 

          Parameters for the Telephony Channel Subtype

          

        
          - **destinationPhoneNumber** *(string) --* **[REQUIRED]** 

            The phone number of the customer, in E.164 format.

            

          
          - **attributes** *(dict) --* **[REQUIRED]** 

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            

          
            - *(string) --* 

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              

            
              - *(string) --* 

                The value of the attribute.

                

              
        
      
          - **connectSourcePhoneNumber** *(string) --* 

            The phone number associated with the Amazon Connect instance, in E.164 format. If you do not specify a source phone number, you must specify a queue.

            

          
          - **answerMachineDetectionConfig** *(dict) --* 

            Answering Machine Detection config

            

          
            - **enableAnswerMachineDetection** *(boolean) --* **[REQUIRED]** 

              Enable or disable answering machine detection

              

            
            - **awaitAnswerMachinePrompt** *(boolean) --* 

              Enable or disable await answer machine prompt

              

            
          
          - **ringTimeout** *(integer) --* 

            Ring timeout for outbound calls

            

          
        
        - **sms** *(dict) --* 

          Parameters for the SMS Channel Subtype

          

        
          - **destinationPhoneNumber** *(string) --* **[REQUIRED]** 

            The phone number of the customer, in E.164 format.

            

          
          - **connectSourcePhoneNumberArn** *(string) --* 

            Amazon Resource Names(ARN)

            

          
          - **templateArn** *(string) --* 

            Amazon Resource Names(ARN)

            

          
          - **templateParameters** *(dict) --* **[REQUIRED]** 

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            

          
            - *(string) --* 

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              

            
              - *(string) --* 

                The value of the attribute.

                

              
        
      
        
        - **email** *(dict) --* 

          Parameters for the Email Channel Subtype

          

        
          - **destinationEmailAddress** *(string) --* **[REQUIRED]** 

            Source/Destination Email address used for Email messages

            

          
          - **connectSourceEmailAddress** *(string) --* 

            Source/Destination Email address used for Email messages

            

          
          - **templateArn** *(string) --* 

            Amazon Resource Names(ARN)

            

          
          - **templateParameters** *(dict) --* **[REQUIRED]** 

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            

          
            - *(string) --* 

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              

            
              - *(string) --* 

                The value of the attribute.

                

              
        
      
        
        - **whatsApp** *(dict) --* 

          Parameters for the WhatsApp Channel Subtype

          

        
          - **destinationPhoneNumber** *(string) --* **[REQUIRED]** 

            The phone number of the customer, in E.164 format.

            

          
          - **connectSourcePhoneNumberArn** *(string) --* 

            Amazon Resource Names(ARN)

            

          
          - **templateArn** *(string) --* 

            Amazon Resource Names(ARN)

            

          
          - **templateParameters** *(dict) --* **[REQUIRED]** 

            A custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

            

          
            - *(string) --* 

              The key of the attribute. Attribute keys can include only alphanumeric, dash, and underscore characters.

              

            
              - *(string) --* 

                The value of the attribute.

                

              
        
      
        
      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'successfulRequests': [
              {
                  'clientToken': 'string',
                  'id': 'string'
              },
          ],
          'failedRequests': [
              {
                  'clientToken': 'string',
                  'id': 'string',
                  'failureCode': 'InvalidInput'|'RequestThrottled'|'UnknownError'|'BufferLimitExceeded'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The response for PutOutboundRequestBatch API.

      
      

      - **successfulRequests** *(list) --* 

        A list of successful requests identified by the unique client token.

        
        

        - *(dict) --* 

          A successful request identified by the unique client token.

          
          

          - **clientToken** *(string) --* 

            Client provided parameter used for idempotency. Its value must be unique for each request.

            
          

          - **id** *(string) --* 

            Identifier representing a Dial request

            
      
    
      

      - **failedRequests** *(list) --* 

        A list of failed requests.

        
        

        - *(dict) --* 

          A failed request identified by the unique client token.

          
          

          - **clientToken** *(string) --* 

            Client provided parameter used for idempotency. Its value must be unique for each request.

            
          

          - **id** *(string) --* 

            Identifier representing a Dial request

            
          

          - **failureCode** *(string) --* 

            A predefined code indicating the error that caused the failure.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.InternalServerException`

  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.ValidationException`

  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.ConflictException`

  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.InvalidCampaignStateException`

  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ConnectCampaignServiceV2.Client.exceptions.ThrottlingException`

  