Import contacts
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/import \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form file='@example-file'const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/import"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"import_id": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}Contacts
Import contacts
Start a CSV contact import.
POST
/
api
/
v1
/
accounts
/
{account_id}
/
contacts
/
import
Import contacts
curl --request POST \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/import \
--header 'Content-Type: multipart/form-data' \
--header 'api_access_token: <api-key>' \
--form file='@example-file'const form = new FormData();
form.append('file', '<string>');
const options = {method: 'POST', headers: {api_access_token: '<api-key>'}};
options.body = form;
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/contacts/import"
files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"api_access_token": "<api-key>"}
response = requests.post(url, files=files, headers=headers)
print(response.text){
"import_id": "<string>"
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}