:doc:`SESV2 <../../sesv2>` / Client / create_contact

**************
create_contact
**************



.. py:method:: SESV2.Client.create_contact(**kwargs)

  

  Creates a contact, which is an end-user who is receiving the email, and adds them to a contact list.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/sesv2-2019-09-27/CreateContact>`_  


  **Request Syntax**
  ::

    response = client.create_contact(
        ContactListName='string',
        EmailAddress='string',
        TopicPreferences=[
            {
                'TopicName': 'string',
                'SubscriptionStatus': 'OPT_IN'|'OPT_OUT'
            },
        ],
        UnsubscribeAll=True|False,
        AttributesData='string'
    )
    
  :type ContactListName: string
  :param ContactListName: **[REQUIRED]** 

    The name of the contact list to which the contact should be added.

    

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

    The contact's email address.

    

  
  :type TopicPreferences: list
  :param TopicPreferences: 

    The contact's preferences for being opted-in to or opted-out of topics.

    

  
    - *(dict) --* 

      The contact's preference for being opted-in to or opted-out of a topic.

      

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

        The name of the topic.

        

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

        The contact's subscription status to a topic which is either ``OPT_IN`` or ``OPT_OUT``.

        

      
    

  :type UnsubscribeAll: boolean
  :param UnsubscribeAll: 

    A boolean value status noting if the contact is unsubscribed from all contact list topics.

    

  
  :type AttributesData: string
  :param AttributesData: 

    The attribute data attached to a contact.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SESV2.Client.exceptions.BadRequestException`

  
  *   :py:class:`SESV2.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`SESV2.Client.exceptions.NotFoundException`

  
  *   :py:class:`SESV2.Client.exceptions.AlreadyExistsException`

  