Create a Contact on hubspot using email showing wrong name

contacts

#1

I am using hubspot creatOrUpdate/email api endpoint to create a new contact.
I’m passing firstname and lastname property and it’s values in request json, but it is creating firstname with value of email.
In some cases there may be only firstname property. In order to get correct details should i require to send both (firstname and lastname ) send simultaneously.


#2

@NAVAL_K Can you please post here your full call to the API endpoint?


#3

@pmanca Here is all data you need to evaluate my call to API endpoint

email = "naval_kumawat@gmail.com"
params = {'hapikey': HUBSPOT_API_KEY}

    payload = {
        "properties": [
            {
                'property': 'email',
                'value': 'naval_kumawat@gmail.com'
            },
            {
                'property': 'firstname',
                'value': 'Naval'
            },
            {
                'property': 'lastname',
                'value': 'Kumawat'
            }
        ]
    }

    {
        'URL': 'https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/' + email + '/',
        'method': 'POST',
        'params': params,
        'json': payload
    }

#4

@NAVAL_K I’ll DM you to get your portal ID so I can see what the contact above looks like in your portal.