Create a contact import job
POST
/contacts/import
const url = 'https://app.surveyrock.com/api/v1/contacts/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"file_path":"example","field_mapping":["example"],"strategy":"skip","list_id":"example","file_name":"example","file_size_bytes":1,"total_rows":1}'};
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://app.surveyrock.com/api/v1/contacts/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "file_path": "example", "field_mapping": [ "example" ], "strategy": "skip", "list_id": "example", "file_name": "example", "file_size_bytes": 1, "total_rows": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
file_path
required
string
field_mapping
required
Array<string>
strategy
required
string
list_id
string
file_name
required
string
file_size_bytes
integer
total_rows
required
integer
Responses
Section titled “Responses”Import job created
Invalid import parameters