# Search enrollments

`needleSearchEnrollments`

Find enrollments by the lead or the campaign name. Every word in query must match. Pass campaignId to search inside one campaign. Each hit includes campaignId.

**Input**

- `query` (string, required): Text to match. Every word must appear in the record.
- `campaignId` (string · uuid, optional): Only enrollments in this campaign.
