Lead Nurturing API Methods

Enroll a Lead in a Lead Nurturing Campaign

POST  /nurture/v1/campaign/:campaign_guid/add

For a given portal, and a given lead nurturing campaign in that portal, enroll a lead into the campaign.

Please Note  The Content-type for your POST request must be "application/json" or "text/plain", otherwise your enrollment operation will not be properly parsed by the API servers and will cause no lead enrollments to be applied.

Required Parameters How to use Description
Campaign GUID Used in the request URL Unique identifier for a particular campaign you're enrolling leads into.
Lead GUID Used in the request body Unique identifier for a particular lead you're enrolling into a lead nurturing campaign.
HubSpot OAuth Access Token access_token=X - Used in the request URL The HubSpot API key for the portal that you're making the call for.
Optional Parameters How to use Description
None None No optional parameters for this method.

Example URL using JSON:  https://api.hubapi.com/nurture/v1/campaign/dd9ba8fa-f7b9-4ece-88d6-cd9dc4124872/add?access_token=demooooo-oooo-oooo-oooo-oooooooooooo

Example request body. The GUID specified below is the Lead GUID that you're enrolling, not the Campaign GUID, which gets specified in the request URL. The request body should by the lead guid ONLY - it's raw text and not JSON.

        8a41f2f22906b93a012906b9438f0008
    

The response from this method will simply be an HTTP response code, there will be no data in the response body.

Here's the breakdown of what you might see:

  • 200 (OK) - If the lead was successfully enrolled in the campaign.
  • 400 (Bad Request) - If the lead is active in the campaign, or if the lead has received the campaign in the past year. Also, if the lead has received the campaign and the campaign cannot be received more than once, you will receive an HTTP 400 error.
  • 401 (Unauthorized) - If your HapiKey is not valid. Make sure you don't have a typo in your URL.
  • 404 (Not found) - If the campaign you have specified by GUID does not exist or if the lead you have specified by GUID does not exist.
  • 500 (Internal Server Error) - If this occurs it is probably our fault. Try again later, or contact the Discussion Group.