:doc:`CustomerProfiles <../../customer-profiles>` / Client / add_profile_key

***************
add_profile_key
***************



.. py:method:: CustomerProfiles.Client.add_profile_key(**kwargs)

  

  Associates a new key value with a specific profile, such as a Contact Record ContactId.

   

  A profile object can have a single unique key and any number of additional keys that can be used to identify the profile that it belongs to.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/customer-profiles-2020-08-15/AddProfileKey>`_  


  **Request Syntax**
  ::

    response = client.add_profile_key(
        ProfileId='string',
        KeyName='string',
        Values=[
            'string',
        ],
        DomainName='string'
    )
    
  :type ProfileId: string
  :param ProfileId: **[REQUIRED]** 

    The unique identifier of a customer profile.

    

  
  :type KeyName: string
  :param KeyName: **[REQUIRED]** 

    A searchable identifier of a customer profile. The predefined keys you can use include: _account, _profileId, _assetId, _caseId, _orderId, _fullName, _phone, _email, _ctrContactId, _marketoLeadId, _salesforceAccountId, _salesforceContactId, _salesforceAssetId, _zendeskUserId, _zendeskExternalId, _zendeskTicketId, _serviceNowSystemId, _serviceNowIncidentId, _segmentUserId, _shopifyCustomerId, _shopifyOrderId.

    

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

    A list of key values.

    

  
    - *(string) --* 

    

  :type DomainName: string
  :param DomainName: **[REQUIRED]** 

    The unique name of the domain.

    

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

    
    ::

      {
          'KeyName': 'string',
          'Values': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **KeyName** *(string) --* 

        A searchable identifier of a customer profile.

        
      

      - **Values** *(list) --* 

        A list of key values.

        
        

        - *(string) --* 
    
  
  **Exceptions**
  
  *   :py:class:`CustomerProfiles.Client.exceptions.BadRequestException`

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

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

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

  
  *   :py:class:`CustomerProfiles.Client.exceptions.InternalServerException`

  