{"_id":"583e3c514828d50f00126c62","user":"5588b847f6c18d0d005bba01","category":{"_id":"57f53fb368a53b2000e03f0f","version":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-10-05T18:00:19.547Z","from_sync":false,"order":0,"slug":"api","title":"REST API"},"version":{"_id":"5588b8a2f6c18d0d005bba06","project":"5588b8a2f6c18d0d005bba03","__v":15,"createdAt":"2015-06-23T01:38:42.696Z","releaseDate":"2015-06-23T01:38:42.696Z","categories":["5588b8a3f6c18d0d005bba07","5588e9689cfea70d00371df3","5588f5921163180d00b64704","561598b121e9110d0078025a","5616f1c9d170d00d00189306","5616f5c3a410c90d00c6121e","561803dcf8c9632100ac7592","563667280441020d0000e9eb","5642570d9417b40d00c0fcd3","57bf5f02efe0050e00d50bd5","57f53fb368a53b2000e03f0f","57f55187440418170086325a","582e3afa72fd270f0006926d","5841faa973967b0f004b4a2b","58db348aa32c8419002433bb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":5,"project":"5588b8a2f6c18d0d005bba03","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-11-30T02:41:21.670Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"curl","language":"curl","code":"curl -XPOST \\\n    --header 'Content-Type: application/json' \\\n    --header \"X-API-Token: <your token>\" \\\n    https://api.mixmax.com/v1/contacts \\\n    -d '{\\\n    \t \"name\": \"Hugo Brockman\",\\\n  \t   \"email\": \"hugo:::at:::mixmax.com\"\\\n    }'"},{"code":"curl -XPOST \\\n    --header 'Content-Type: application/json' \\\n    --header \"X-API-Token: <your token>\" \\\n    https://api.mixmax.com/v1/contacts\n    -d '{\\\n    \t\"contacts\":[{\\\n    \t \t \"name\": \"Hugo Brockman\",\\\n  \t   \t \"email\": \"hugo@mixmax.com\"\\\n     \t}]\\\n    }'","language":"curl","name":"curl (multiple)"}]},"method":"post","results":{"codes":[{"name":"","code":"","language":"curl","status":204}]},"settings":"","auth":"required","params":[{"_id":"583e3c514828d50f00126c64","ref":"Contact","in":"body","required":true,"desc":"Email address for the contact. This is unique per contact. If you create a new contact with the same email as an existing contact, then this will be merged with that contact. To post multiple emails and names, pass then as an array of `contacts` - see example below.","default":"","type":"string","name":"email"},{"_id":"587bdf7c59fb322300255703","ref":"","in":"body","required":false,"desc":"Name for the contact.","default":"\"\"","type":"string","name":"name"},{"_id":"587bdf7c59fb322300255702","ref":"","in":"body","required":false,"desc":"Array of ids for contact groups _ids that this contact is in.","default":"[]","type":"array_string","name":"groups"},{"_id":"587bdf7c59fb3223002556ff","ref":"","in":"body","required":false,"desc":"Contact variables from any source (ex. Salesforce) that are used to populate sequences and templates variables.","default":"{}","type":"object","name":"meta"},{"_id":"587bdf7c59fb322300255701","ref":"","in":"body","required":false,"desc":"Google ID that this contact is associated with, if a contact exists in Google Contacts for this same email address.","default":"","type":"string","name":"contactId"},{"_id":"587bdf7c59fb322300255700","ref":"","in":"body","required":false,"desc":"Salesforce ID that this contact is associated with, if a contact exists in Salesforce (either contact or a lead) for this same email address.","default":"","type":"string","name":"salesforceId"},{"_id":"583e3c514828d50f00126c63","ref":"","in":"body","required":false,"desc":"Meta-field that will increment the contact's usedCount count and also set the `timestamp` to now.","default":"false","type":"boolean","name":"markAsUsed"},{"_id":"584708211023e61b006ce932","ref":"","in":"body","required":false,"desc":"Meta-field that if true, will merge in information from third party sources such as Salesforce, if there's a Salesforce account connected and the email address of this contact matches.","default":"false","type":"boolean","name":"enrich"}],"url":"/v1/contacts"},"isReference":true,"order":11,"body":"Note that you can create multiple contacts by passing them as an array on the `contacts` key. See above example.","excerpt":"Create one or more contacts","slug":"contacts-1","type":"endpoint","title":"/contacts"}

post/contacts

Create one or more contacts

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

email:
required
string
Email address for the contact. This is unique per contact. If you create a new contact with the same email as an existing contact, then this will be merged with that contact. To post multiple emails and names, pass then as an array of `contacts` - see example below.
name:
string""
Name for the contact.
groups:
array of strings[]
Array of ids for contact groups _ids that this contact is in.
meta:
object{}
Contact variables from any source (ex. Salesforce) that are used to populate sequences and templates variables.
contactId:
string
Google ID that this contact is associated with, if a contact exists in Google Contacts for this same email address.
salesforceId:
string
Salesforce ID that this contact is associated with, if a contact exists in Salesforce (either contact or a lead) for this same email address.
markAsUsed:
booleanfalse
Meta-field that will increment the contact's usedCount count and also set the `timestamp` to now.
enrich:
booleanfalse
Meta-field that if true, will merge in information from third party sources such as Salesforce, if there's a Salesforce account connected and the email address of this contact matches.

Examples


Documentation

Note that you can create multiple contacts by passing them as an array on the `contacts` key. See above example.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}