POST /v1/contacts/import
const url = 'https://seu-endereco-da-api/v1/contacts/import';const form = new FormData();form.append('file', 'file');form.append('tagId', '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://seu-endereco-da-api/v1/contacts/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@file \ --form tagId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0Permissão que a Chave de acesso precisa: Importar contatos (contacts:import).
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
CSV with columns name, phoneNumber, optional attributes (JSON) and one optional column per custom field, headed by its label or key
Tag applied to every contact the spreadsheet names, new or already in the base
Responses
Seção intitulada “Responses”object
Contacts that already existed and had empty fields filled by the spreadsheet
Rows whose contact was already in the base
Rows that were not saved because the plan’s contact limit was reached
Contacts that got the requested tag: the audience a campaign built from this spreadsheet reaches
Contacts that entered without one or more refused field values
Every refused value, refused row and ignored column, listed or not
The first 1000 issues: spreadsheet row (1 is the header), column and reason
object
Example
{ "status": "pending"}File is required or exceeds the size limit