# AI Search API reference

23 endpoints

[Read the guide](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api.md)

[Download OpenAPI JSON](https://docs.contextual.io/openapi/ai-search-api.json)

## Internal

- [POST /migrations/errors](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-migrations-errors.md) — Report migration item failures

- [POST /migrations/complete](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-migrations-complete.md) — Complete a migration once its pipeline signal has passed all queued work

- [POST /projections/skipped](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-projections-skipped.md) — Report a record a handler acknowledged without indexing

- [POST /reconciliations/complete](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-reconciliations-complete.md) — Record one completed embedding branch of a reconciliation run

## Membership

- [POST /membership/references](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-membership-references.md) — Add a search profile membership reference

- [DELETE /membership/references/{profileId}](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/delete-membership-references-by-profileid.md) — Remove a search profile membership reference

- [POST /membership/references/query](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-membership-references-query.md) — Read the search profile membership of a record

## Organizations

- [GET /organizations](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-organizations.md) — List organizations with search profiles

## Profiles

- [GET /profiles](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-profiles.md) — List search profiles

- [POST /profiles](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-profiles.md) — Create search profile

- [POST /$page/profiles](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-dollar-page-profiles.md) — Page search profiles

- [GET /profiles/{profileId}](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-profiles-by-profileid.md) — Get search profile

- [PUT /profiles/{profileId}](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/put-profiles-by-profileid.md) — Commit a search profile

- [DELETE /profiles/{profileId}](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/delete-profiles-by-profileid.md) — Delete a search profile

- [GET /profiles/{profileId}/index-state](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-profiles-by-profileid-index-state.md) — Get search profile index state

- [GET /profiles/{profileId}/schema](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-profiles-by-profileid-schema.md) — Get the physical projection schema of each live search index

- [GET /profiles/{profileId}/progress](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-profiles-by-profileid-progress.md) — Get search profile progress

- [POST /profiles/{profileId}/reconcile](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-profiles-by-profileid-reconcile.md) — Accept a background repair; poll profile progress for record counts

- [POST /profiles/{profileId}/drain](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-profiles-by-profileid-drain.md) — Drop this profile's work published before now until the drain expires; repair afterward

- [GET /profiles/{profileId}/drain](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/get-profiles-by-profileid-drain.md) — Get the active profile drain cutoff and expiry

- [POST /profiles/{profileId}/reconcile/cancel](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-profiles-by-profileid-reconcile-cancel.md) — Stop a repair scan that has not finished queuing records

- [POST /profiles/{profileId}/migrate](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-profiles-by-profileid-migrate.md) — Rebuild a search profile into a new index generation

## Search

- [POST /query](https://docs.contextual.io/legacy/tenants/tenant-apis/ai-search-api/reference/post-query.md) — Query a search profile