--- description: "POST /v1/custom-model/{id}/phrases/delete \u2014 remove phrases from a custom model by value." --- # Delete Phrases Remove phrases from a custom model by value. Removing is idempotent: phrases that are not present are reported as skipped. ``` POST https://api.reson8.dev/v1/custom-model/{id}/phrases/delete ``` ## Request ### Headers | Header | Value | |----------------|-----------------------------------------------| | Authorization | `ApiKey ` or `Bearer ` | | Content-Type | `application/json` | ### Path Parameters | Parameter | Type | Description | |-----------|--------|--------------------------| | `id` | string | ID of the custom model | ### Body | Field | Type | Required | Description | |-----------|----------|----------|----------------------------------------| | `phrases` | string[] | Yes | Phrases to remove (must not be empty) | ### Example === "curl" ```bash curl -X POST "https://api.reson8.dev/v1/custom-model/a1b2c3d4-e5f6-7890-abcd-ef1234567890/phrases/delete" \ -H "Authorization: ApiKey " \ -H "Content-Type: application/json" \ -d '{ "phrases": ["pericarditis", "tachycardia"] }' ``` === "Python" ```python import requests response = requests.post( "https://api.reson8.dev/v1/custom-model/a1b2c3d4-e5f6-7890-abcd-ef1234567890/phrases/delete", headers={ "Authorization": "ApiKey ", "Content-Type": "application/json", }, json={"phrases": ["pericarditis", "tachycardia"]}, ) result = response.json() ``` ## Response `200 OK` | Field | Type | Description | |-----------|--------|--------------------------------------------------------| | `deleted` | number | Number of phrases removed | | `skipped` | number | Number of submitted phrases not removed (not present or duplicate) | ### Example In the request above `tachycardia` was not in the model: ```json { "deleted": 1, "skipped": 1 } ``` ## Errors | Status | Code | Description | |--------|-------------------|--------------------------------------| | 400 | `INVALID_REQUEST` | Empty list or blank phrase | | 401 | `UNAUTHORIZED` | Invalid or expired credentials | | 404 | `NOT_FOUND` | Custom model not found | | 500 | `INTERNAL_ERROR` | Unexpected server error |