This endpoint will create a new contact. The duplications are checked on the email address level and the workspace level together.

Endpoint

POST https://api.mailstand.com/contacts

Payload

These fields are allows required in the payload when creating a contact.

Required Fields

FieldTypeRequiredDescription
owner_keystringtrueThe API of the user who is the owner of the contact.
workspacestringtrueThe workspace ID that you want to query. This always start with space_.
emailstringtrueThe email address of the contact.
upload_options[duplicates]object/stringtrueThis is either skip, overwrite or update_missing_fields. You can learn more about the deduplication options here.

The most common option is skip.
upload_options[strict_validation]object/booleantrueIf true we run the validation on our standard fields. You can learn more about validations here and here.

The most common choice is false.
upload_options[campaign]object/stringtrueThe campaign that you want to upload the contact to. This always starts with camp_. If you don't want to add a contact to a campaign, you can set the value to null.

Optional Fields
Mailstand automatically creates default fields that you can use while uploading contacts. If you require custom fields see how custom fields are used when uploading a contact.

FieldType
first_nameContact's first name.
middle_nameContact's middle name.
last_nameContact's last name.
full_nameContact's full name.
nicknameContact's nickname.
titleContact's title or also known as role.
mobile_phoneContact's mobile / cell phone number.
work_phoneContact's work phone number.
home_phoneContact's home phone number.
voip_phoneContact's VOIP phone number.
other_phoneContact's other phone number.
company_nameContact's company name. Typically an informal name like "Acme".
company_formal_nameContact's formal company name. Typically formal name like "Acme, Inc.".
company_industryContact's company industry.
address_1Contact's address line one.
address_2Contact's address line two.
cityContact's city.
stateContact's state. You can use prefix (like CA) or full name (like California).
zipContact's zip code.
countryContact's country. You can use prefix (US) or full name (United States).
regionContact's region.
timezoneContact's timezone. You can find a list of valid timezone inputs here.
genderContact's gender.
occupationContact's occupation.
linkedinContact's LinkedIn URL or LinkedIn Handle.
twitterContact's Twitter URL or Twitter Handle.
stack_overflowContact's StackOverflow URL or StackOverflow Handle.
websiteContact's website.
website_2Contact's 2nd website.
website_3Contact's 3rd website.
personal_noteContact's personal note.
personal_note_2Contact's 2nd personal note.
personal_note_3Contact's 3rd personal note.
job_start_dateContact's job start date.
schoolContact's school.
graduation_dateContact's graduation date.
degreeContact's degree.

Using Custom Variables

When uploading contacts with custom variables you will have to upload with the custom_ prefix. You can use the List fields on a workspace endpoint to get a list of variables for the workspace and what fields line up with the custom_ prefix.

Payload Example

When sending an API call you only need to provide the required fields and then the optional fields you would like to add. Here's an example below.

{
    "owner_key": "key_abc123efg4567hij",
    "workspace": "space_987zyx654abc",
    "first_name": "John",
    "middle_name": "J",
    "last_name": "Barnes",
    "full_name": "John J Barnes",
    "nickname": "Mike",
    "email": "[email protected]",
    "title": "CEO & Founder",
    "company_name": "Acme",
    "company_formal_name": "Acme, Inc.",
    "work_phone": "1 555-555-5555",
    "custom_1": "My First Custom Field",
    "custom_2": "My 2nd Custom Field",
    "upload_options": {
        "duplicates": "skip",
        "strict_validation": false,
        "campaign": "camp_abc987zyx123"
    }
}

200 or 201 Response

On a successful upload we will either pass a 200 or 201 response depending on what happened. Here's some example outputs

Example 1: A new contact was created

{
		"status": "added",
		"id": "contact_abc123",
		"details": null
}

Example 2: A contact was skipped due to a duplicate contact added

{
		"status": "skipped",
		"id": null,
		"details": "Deuplicate contact."
}

Example 3: If fields were overwritten on a contact.

{
		"status": "overwriten",
		"id": "contact_abc123",
		"details": null
}

Example 4: If a contact only had missing fields updated.

{
		"status": "updated_missing_fields",
		"id": "contact_abc123",
		"details": null
}