Create a new contact

Last updated December 30, 2019

POST /contacts/v1/contact

Method Details

HTTP Methods:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing & CRM

Required Scope:

contacts

The create a new contact endpoint is used to create a new contact in HubSpot. The new contact will be assigned a unique ID (vid), which can be used to look it up later.

Use case for this endpoint: This endpoint can be used to perform a one-time sync of new contacts from an external system into HubSpot.

Need to create or update multiple contacts? Try the Batch API.

Note: This endpoint is designed for offline contacts and does not support lead tracking. If your contacts come through online forms, use the form submission endpoint.

Required parameters How to use Description
OAuth Access Token or API Key Authorization: Bearer {token} header
or hapikey={key} query parameter.
Used to authenticate the request. Please see this page for more details about authentication.
Contact properties "properties": [...]
Used in the request body
A list of contact properties that you want to set for the new contact record. Each entry in the list must include the internal name of the property, and the value that you want to set for that property. Note: You must include at least one property for the new contact or you will receive an error.
Optional parameters How to use Description
Email address Used in the request body While we recommend that all contact records include an email address, it is possible to create contacts without an email address by leaving out the email property.

Example URL to POST to:  https://api.hubapi.com/contacts/v1/contact/?hapikey=demo

Response details

  • Returns a 200 response on success, which will include the details for the created contact
  • Returns a 409 Conflict if there is an existing contact with the email address included in the request. The response body will have the identityProfile details of the contact, which will include the vid of the existing record.
  • Returns a 400 error when there is a problem with the data in the request body, including when there are no properties included in the request data.

These code samples use a demo API key. Using this key for anything but GET requests will result in an error. For all other requests (such as POST or PUT), you'll need to use your own API key or OAuth. For more details, please see here