user20597283
user20597283

Reputation: 11

Unable to get resonse from import contacts sendgrid API using python

Below is the call I am trying to make - I used field mapping in below data - data = { "file_type": "csv", "field_mappings": [ "_rf2_T", "_rf0_T", "_rf1_T", "_rf10_T", "w1_T", "w45_T", "w46_T", "w44_T", "w2_D", "w43_T" ] } print("--data---",data)

response = sg.client.marketing.contacts.put(
    request_body=data
)

#print("--data---",data)
print(response.status_code)
print(response.body)
print(response.headers)

and getting below error {'errors': [{'field': 'contacts', 'message': 'at least one contact is required'}]}

I am expecting upload url and header from api call

Upvotes: 1

Views: 103

Answers (0)

Related Questions