# Search enrollments

### Search enrollments

`POST /api/v1/enrollments/search`

Operation ID: `searchEnrollments`

Find enrollments by the lead or the campaign name. Every word in query must appear. Pass campaignId to search inside one campaign. Use the id and campaignId with the campaign lead endpoints.

**Request body** (required)

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

**200**: Matching enrollments.

- `enrollments` (object[], required): Up to 20 matches. Each hit includes campaignId.
- `requestId` (string · uuid, required): Id of this request, for support and troubleshooting

**Errors**

- `400`: Bad request
- `401`: Unauthorized: missing or invalid API key
- `403`: Forbidden
- `404`: Not found
- `422`: Invalid request payload
