Create or update a contact

Last updated December 30, 2019

POST /contacts/v1/contact/createOrUpdate/email/:contact_email

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 or update a contact endpoint is used to create a new HubSpot contact or update an existing one. 

Use case for this endpoint: This method is useful when syncing changes to contacts in other CRMs with your HubSpot contacts.

Response details

If successful, the returned data will include the unique identifier (visitor ID, or vid) of the contact and the request type (create or update).

  • Returns a 200 response on success. The response will contain a vid of the updated or created record, and an isNew field that indicates if a new record was created. If the field is false, an existing record was updated.
  • Return a 409 Conflict error response if you are trying to update the email address of a record, and there is an existing record with the new email address.

Need to create or update a large number of contacts? Try the Batch API.

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 JSON Used in the request body This is JSON that represents a contact that you're creating. This should be of the format seen below in the code sample given.

Example URL to POST to:  https://api.hubapi.com/contacts/v1/contact/createOrUpdate/email/test@hubspot.com/?hapikey=demo

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