We are trying to add contacts to SendGrid using "v3/marketing/contacts" API and we are using client.PutAsync. But we are getting response "Request too long". We are sending more than 20000 records (less than 30000) and size is around 5 MB. According to SendGrid documentation we can send 30000 contacts or 6 MB of data whichever is lesser. Now my question is :
- Why we are getting "Request too long" response?
- If we call this API, do we need to send all the records everytime. If a records is already present in SendGrid and in next call if we don't send that record again it is getting deleted. Is it the correct behaviour? We are sending contacts to List. Below is the piece of code :
var rawResponse = await client.PutAsync("v3/marketing/contacts", body); var rawContent = await rawResponse.Content.ReadAsStringAsync();
This rawContent is showing "request too long"