Create a new contact
POST
/contacts
const url = 'https://app.surveyrock.com/api/v1/contacts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","first_name":"example","last_name":"example","customFields":{}}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "first_name": "example", "last_name": "example", "customFields": {} }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
first_name
string
last_name
string
customFields
object
Examplegenerated
{ "email": "hello@example.com", "first_name": "example", "last_name": "example", "customFields": {}}Responses
Section titled “Responses”Contact created
Duplicate email