Campaign & Workflow Setup
Add and remove contacts from campaigns and workflows programmatically. This quick-start covers enrolling contacts into sequences, removing them when conditions change, and verifying the enrollment status.
Prerequisites
Before working with Campaign and Workflow endpoints, confirm you have:
- A GoHighLevel sub-account with at least one active campaign or workflow built
- A Private Integration Token with the
contactsscope configured - The
campaignIdorworkflowIdyou want to enroll contacts into (found in the campaign/workflow URL) - At least one contact ID to test enrollment with
- A REST client such as Postman, Insomnia, or
curl
Set Up Authentication
Campaign and workflow enrollment endpoints use the same authentication as all contact endpoints. You need a Private Integration Token (PIT) with the contacts scope.
Navigate to Settings > Integrations > Private Integrations in your sub-account. If you already have a PIT with the contacts scope, reuse it. Otherwise, create a new integration, enable the contacts scope, save, and copy the token.
Set your Authorization header to Bearer {your-pit-token} for all requests. Your base URL is https://services.leadconnectorhq.com.
Note: These endpoints control enrollment only. They do not create or modify the campaigns or workflows themselves. You still build campaigns and workflows in the GoHighLevel UI.
Make Your First Call
The most common operation is adding a contact to a campaign. Send a POST request to /contacts/{contactId}/campaigns/{campaignId}:
POST /contacts/{contactId}/campaigns/{campaignId}
Authorization: Bearer {your-pit-token}
No request body is needed. The contact is immediately enrolled in the specified campaign and begins receiving the campaign’s sequence of messages.
To add a contact to a workflow, use a similar pattern:
POST /contacts/{contactId}/workflow/{workflowId}
Authorization: Bearer {your-pit-token}
The contact enters the workflow at the trigger point and proceeds through each action step.
To remove a contact from a specific campaign, use DELETE /contacts/{contactId}/campaigns/{campaignId}. To remove from all campaigns at once, use DELETE /contacts/{contactId}/campaigns with no campaign ID. To remove from a workflow, use DELETE /contacts/{contactId}/workflow/{workflowId}.
Handle the Response
A successful enrollment returns a 200 status confirming the action:
{
"succeded": true
}
Note the API response uses succeded (not “succeeded”). Check for this exact key in your code.
A successful removal also returns a 200 status with a confirmation. If the contact was not enrolled in the specified campaign or workflow, the API still returns 200 without an error. This makes the endpoints idempotent, so you can safely call them without checking enrollment status first.
Common errors: 404 means the contactId, campaignId, or workflowId does not exist. 401 means your token is invalid or lacks the contacts scope. If a campaign or workflow is paused or archived, enrollment may succeed but the contact will not receive messages until it is reactivated.
Test Your Setup
Run through this checklist to confirm campaign and workflow enrollment is working:
- Add to a campaign with
POST /contacts/{id}/campaigns/{campaignId}and verify the200response - Check in the UI by opening the contact record. Navigate to the Campaigns tab and confirm the contact is enrolled
- Remove from the campaign with
DELETE /contacts/{id}/campaigns/{campaignId}and verify removal in the UI - Add to a workflow with
POST /contacts/{id}/workflow/{workflowId}and verify enrollment - Remove from all campaigns with
DELETE /contacts/{id}/campaignsand confirm the contact has no active campaign enrollments
Use a test campaign that sends to an internal email address or phone number. This prevents accidental messages to real contacts during testing.
Next Steps
Read the full Campaign & Workflow Guide for advanced enrollment patterns including conditional enrollment and re-enrollment rules. Combine with Contact Tags to tag contacts before enrollment for segmented tracking, or use Contact CRUD search to find contacts matching specific criteria before bulk-enrolling them.